mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 16:40:05 +01:00
Ignore output for commands using "> /dev/null 2>&1"
This commit is contained in:
@@ -68,10 +68,12 @@ function run($print, $plainText)
|
||||
|
||||
$output = $this->runCommand($command);
|
||||
|
||||
if ($this->ignoreOutput($command)) return;
|
||||
|
||||
$this->afterCommand($command, $output);
|
||||
|
||||
return compact('command', 'output');
|
||||
});
|
||||
})->filter()->values();
|
||||
|
||||
$output = $this->format($results, $plainText);
|
||||
|
||||
@@ -127,6 +129,11 @@ function afterCommand($command, $output)
|
||||
}
|
||||
}
|
||||
|
||||
function ignoreOutput($command)
|
||||
{
|
||||
return strpos($command, '> /dev/null 2>&1') !== false;
|
||||
}
|
||||
|
||||
function format($results, $plainText)
|
||||
{
|
||||
return $results->map(function ($result) use ($plainText) {
|
||||
|
||||
Reference in New Issue
Block a user