diff --git a/Console/Command/EnableCommand.php b/Console/Command/EnableCommand.php index 363134b5..209cb818 100644 --- a/Console/Command/EnableCommand.php +++ b/Console/Command/EnableCommand.php @@ -372,19 +372,30 @@ protected function execute(InputInterface $input, OutputInterface $output) // @c } // Upload VCL + $activateFlag = false; if ($input->getOption('upload-vcl')) { + $activateFlag = true; $this->uploadVcl($input->getOption('activate')); } // Enable Force TLS snippet if ($input->getOption('enable-force-tls')) { + $activateFlag = true; $this->enableforceTls($input->getOption('activate')); } // Enable Force TLS snippet if ($input->getOption('disable-force-tls')) { + $activateFlag = true; $this->disableforceTls($input->getOption('activate')); } + if ($activateFlag === false && ($input->getOption('activate')) + ) { + $this->output->writeln( + 'Activate flag can\'t be used alone. It should be used in combination with --upload-vcl, --enable-force-tls or --disable-force-tls', + OutputInterface::OUTPUT_NORMAL + ); + } // Enable if ($input->getOption('enable')) {