escape argument
This commit is contained in:
parent
e2352f41b5
commit
a5eb210866
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Utilities;
|
namespace App\Utilities;
|
||||||
|
|
||||||
|
use Illuminate\Support\ProcessUtils;
|
||||||
use Symfony\Component\Process\PhpExecutableFinder;
|
use Symfony\Component\Process\PhpExecutableFinder;
|
||||||
use Symfony\Component\Process\Process;
|
use Symfony\Component\Process\Process;
|
||||||
|
|
||||||
@ -31,14 +32,14 @@ class Console
|
|||||||
|
|
||||||
public static function getPhpBinary()
|
public static function getPhpBinary()
|
||||||
{
|
{
|
||||||
$bin = (new PhpExecutableFinder)->find(false);
|
$bin = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));
|
||||||
|
|
||||||
return !empty($bin) ? $bin : 'php';
|
return !empty($bin) ? $bin : 'php';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getArtisanBinary()
|
public static function getArtisanBinary()
|
||||||
{
|
{
|
||||||
return defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan';
|
return defined('ARTISAN_BINARY') ? ProcessUtils::escapeArgument(ARTISAN_BINARY) : 'artisan';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function formatCommandString($string)
|
public static function formatCommandString($string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user