Skip to content

Commit

Permalink
Add meaningful message when Process is not installed (ProcessHelper)
Browse files Browse the repository at this point in the history
  • Loading branch information
l-vo authored and fabpot committed May 29, 2020
1 parent 4ac2968 commit 6b71a89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Helper/ProcessHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class ProcessHelper extends Helper
*/
public function run(OutputInterface $output, $cmd, $error = null, callable $callback = null, $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE)
{
if (!class_exists(Process::class)) {
throw new \LogicException('The Process helper requires the "Process" component. Install "symfony/process" to use it.');
}

if ($output instanceof ConsoleOutputInterface) {
$output = $output->getErrorOutput();
}
Expand Down

0 comments on commit 6b71a89

Please sign in to comment.