From 810da739badd7b65430c49a7dcf1f216d24ed02d Mon Sep 17 00:00:00 2001 From: Domagoj Potkoc Date: Fri, 21 Jul 2023 14:35:18 +0200 Subject: [PATCH] Fix for #653 --- Console/Command/EnableCommand.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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')) {