From 9a2172b463c6b56dd2b44a4f664169950fe29048 Mon Sep 17 00:00:00 2001 From: Kay Wei Date: Wed, 10 Jan 2024 15:19:56 +0800 Subject: [PATCH] [Process] Fix executable finder when the command starts with a dash --- PhpExecutableFinder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhpExecutableFinder.php b/PhpExecutableFinder.php index bed6c3dc..45dbcca4 100644 --- a/PhpExecutableFinder.php +++ b/PhpExecutableFinder.php @@ -35,7 +35,7 @@ public function find(bool $includeArgs = true) { if ($php = getenv('PHP_BINARY')) { if (!is_executable($php)) { - $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v'; + $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v --'; if ($php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) { if (!is_executable($php)) { return false;