option to return all output
This commit is contained in:
parent
66cf22e76a
commit
b13f6e2310
@ -6,7 +6,7 @@ use Symfony\Component\Process\Process;
|
|||||||
|
|
||||||
class Console
|
class Console
|
||||||
{
|
{
|
||||||
public static function run($command)
|
public static function run($command, $all_output = false)
|
||||||
{
|
{
|
||||||
$process = new Process($command, base_path());
|
$process = new Process($command, base_path());
|
||||||
$process->setTimeout(900); // 15 minutes
|
$process->setTimeout(900); // 15 minutes
|
||||||
@ -17,6 +17,6 @@ class Console
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $process->getErrorOutput();
|
return $all_output ? $process->getOutput() : $process->getErrorOutput();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user