Merge pull request #904 from maurice2k/feature/throw-process-failed-exception

Adjusted runLocally to throw ProcessFailedException in case of error
This commit is contained in:
Anton Medvedev 2016-11-25 20:38:47 +07:00 committed by GitHub
commit 899190a644

View File

@ -20,6 +20,7 @@ use Monolog\Logger;
use Symfony\Component\Console\Question\ConfirmationQuestion;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;
use Deployer\Cluster\ClusterFactory;
use Symfony\Component\Console\Input\InputArgument;
@ -353,7 +354,7 @@ function runLocally($command, $timeout = 60)
});
if (!$process->isSuccessful()) {
throw new \RuntimeException($process->getErrorOutput());
throw new ProcessFailedException($process);
}
$output = $process->getOutput();