server:run command: provide more error information

The server:run command didn't provide many information when the executed
command exited unexpectedly. Now, the process' exit code is passed through
and an error message is displayed.
This commit is contained in:
Christian Flothmann 2014-07-13 13:34:23 +02:00
parent d23320fa24
commit 5ba40bfd49

View File

@ -102,6 +102,16 @@ EOF
$this
->getHelper('process')
->run($output, $process, null, null, OutputInterface::VERBOSITY_VERBOSE);
if (!$process->isSuccessful()) {
$output->writeln('<error>Built-in server terminated unexpectedly</error>');
if ($process->isOutputDisabled()) {
$output->writeln('<error>Run the command again with -v option for more details</error>');
}
}
return $process->getExitCode();
}
private function createPhpProcessBuilder(InputInterface $input, OutputInterface $output, $env)