Skip to content

Commit

Permalink
[Process] minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Sep 17, 2024
1 parent 6f16c62 commit 1b9fa82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ExecutableFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function find(string $name, ?string $default = null, array $extraDirs = [
}

$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v --';
if (\function_exists('exec') && ($executablePath = strtok(@exec($command.' '.escapeshellarg($name)), \PHP_EOL)) && is_executable($executablePath)) {
if (\function_exists('exec') && ($executablePath = strtok(@exec($command.' '.escapeshellarg($name)), \PHP_EOL)) && @is_executable($executablePath)) {
return $executablePath;
}

Expand Down

0 comments on commit 1b9fa82

Please sign in to comment.