From 5ba40bfd494df61cd80a806c72da356ca5a5f384 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 13 Jul 2014 13:34:23 +0200 Subject: [PATCH] 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. --- .../FrameworkBundle/Command/ServerRunCommand.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index c132453366..eab6e1775e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -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('Built-in server terminated unexpectedly'); + + if ($process->isOutputDisabled()) { + $output->writeln('Run the command again with -v option for more details'); + } + } + + return $process->getExitCode(); } private function createPhpProcessBuilder(InputInterface $input, OutputInterface $output, $env)