From c60a251661c1fafbe165356caec8c7e50f0d929e Mon Sep 17 00:00:00 2001 From: Marvin Caspar Date: Fri, 3 Jun 2016 10:20:56 +0200 Subject: [PATCH] Set return code for SetModeCommand In case of running the `bin/magento deploy:mode:set production` command in a shell script this will return an error code 129 and all other commands after this will not be executed. --- app/code/Magento/Deploy/Console/Command/SetModeCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Deploy/Console/Command/SetModeCommand.php b/app/code/Magento/Deploy/Console/Command/SetModeCommand.php index 17c9da2d07ffb..85148917e3546 100644 --- a/app/code/Magento/Deploy/Console/Command/SetModeCommand.php +++ b/app/code/Magento/Deploy/Console/Command/SetModeCommand.php @@ -104,6 +104,8 @@ protected function execute(InputInterface $input, OutputInterface $output) throw new LocalizedException(__('Cannot switch into given mode "%1"', $toMode)); } $output->writeln('Enabled ' . $toMode . ' mode.'); + + return \Magento\Framework\Console\Cli::RETURN_SUCCESS; } catch (\Exception $e) { $output->writeln('' . $e->getMessage() . ''); if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {