Skip to content

Commit

Permalink
fixed InstallCommand exit-code
Browse files Browse the repository at this point in the history
due to the symfony command line interface implementation it is required to set the autoExit to false in order to run multiple commands
by setting autoExit to true for this case symfony cli will now exit with exit-code 1

fixes #533
  • Loading branch information
Simon Bräuer committed Apr 27, 2015
1 parent 4d6e101 commit b9c320c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/N98/Magento/Command/Installer/InstallCommand.php
Expand Up @@ -681,7 +681,8 @@ protected function installMagento(InputInterface $input, OutputInterface $output
exec($installCommand, $installationOutput, $returnStatus);
$installationOutput = implode(PHP_EOL, $installationOutput);
if ($returnStatus !== self::EXEC_STATUS_OK) {
throw new \Exception('Installation failed.' . $installationOutput);
$this->getApplication()->setAutoExit(true);
throw new \RuntimeException('Installation failed.' . $installationOutput, 1);
} else {
$output->writeln('<info>Successfully installed Magento</info>');
$encryptionKey = trim(substr($installationOutput, strpos($installationOutput, ':') + 1));
Expand Down

0 comments on commit b9c320c

Please sign in to comment.