Skip to content

Commit 9a2172b

Browse files
kayw-geeknicolas-grekas
authored andcommitted
[Process] Fix executable finder when the command starts with a dash
1 parent 8fa2217 commit 9a2172b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PhpExecutableFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function find(bool $includeArgs = true)
3535
{
3636
if ($php = getenv('PHP_BINARY')) {
3737
if (!is_executable($php)) {
38-
$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v';
38+
$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v --';
3939
if ($php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) {
4040
if (!is_executable($php)) {
4141
return false;

0 commit comments

Comments
 (0)