Skip to content

Commit c60a251

Browse files
author
Marvin Caspar
committed
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.
1 parent a5fa3af commit c60a251

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: app/code/Magento/Deploy/Console/Command/SetModeCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
104104
throw new LocalizedException(__('Cannot switch into given mode "%1"', $toMode));
105105
}
106106
$output->writeln('Enabled ' . $toMode . ' mode.');
107+
108+
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
107109
} catch (\Exception $e) {
108110
$output->writeln('<error>' . $e->getMessage() . '</error>');
109111
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {

0 commit comments

Comments
 (0)