mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 16:40:05 +01:00
Fixed warning on newer symfony/process versions
This commit is contained in:
@@ -74,7 +74,11 @@ function runCommand($command, callable $onError = null)
|
|||||||
{
|
{
|
||||||
$onError = $onError ?: function () {};
|
$onError = $onError ?: function () {};
|
||||||
|
|
||||||
$process = new Process($command);
|
if (method_exists(Process::class, 'fromShellCommandline')) {
|
||||||
|
$process = Process::fromShellCommandline($command);
|
||||||
|
} else {
|
||||||
|
$process = new Process($command);
|
||||||
|
}
|
||||||
|
|
||||||
$processOutput = '';
|
$processOutput = '';
|
||||||
$process->setTimeout(null)->run(function ($type, $line) use (&$processOutput) {
|
$process->setTimeout(null)->run(function ($type, $line) use (&$processOutput) {
|
||||||
|
|||||||
Reference in New Issue
Block a user