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:
parent
d23320fa24
commit
5ba40bfd49
@ -98,10 +98,20 @@ EOF
|
||||
if (OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) {
|
||||
$process->disableOutput();
|
||||
}
|
||||
|
||||
|
||||
$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)
|
||||
|
Reference in New Issue
Block a user