Skip to content

Commit 308010e

Browse files
authored
Update CommandTool.php
1 parent 8805e5e commit 308010e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Utils/CommandTool.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ public static function getRealpath($path)
3030
return realpath($path);
3131
}
3232

33+
public static function formatCommand($command)
34+
{
35+
if (is_string($command)) {
36+
$command = explode(' ', $command);
37+
}
38+
39+
return $command;
40+
}
41+
3342
public function createProcess(array $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
3443
{
3544
return tap(new \Symfony\Component\Process\Process(...func_get_args()));

0 commit comments

Comments
 (0)