escape argument

This commit is contained in:
denisdulici 2020-05-22 01:15:09 +03:00
parent e2352f41b5
commit a5eb210866

View File

@ -2,6 +2,7 @@
namespace App\Utilities;
use Illuminate\Support\ProcessUtils;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;
@ -31,14 +32,14 @@ class Console
public static function getPhpBinary()
{
$bin = (new PhpExecutableFinder)->find(false);
$bin = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));
return !empty($bin) ? $bin : 'php';
}
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)