Add meaningful message when Process is not installed (ProcessHelper)
This commit is contained in:
parent
03cad5a750
commit
3ab76e40ff
@ -37,6 +37,10 @@ class ProcessHelper extends Helper
|
|||||||
*/
|
*/
|
||||||
public function run(OutputInterface $output, $cmd, $error = null, callable $callback = null, $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE)
|
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) {
|
if ($output instanceof ConsoleOutputInterface) {
|
||||||
$output = $output->getErrorOutput();
|
$output = $output->getErrorOutput();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user