update patch 1

This commit is contained in:
fiqhpratama
2024-12-02 01:18:34 +07:00
parent 453d9bb470
commit 25026b0a85
3380 changed files with 103529 additions and 363623 deletions
+5 -3
View File
@@ -38,7 +38,10 @@ class ExecutableFinder
}
/**
* Adds new possible suffix to check for executable.
* Adds new possible suffix to check for executable, including the dot (.).
*
* $finder = new ExecutableFinder();
* $finder->addSuffix('.foo');
*/
public function addSuffix(string $suffix): void
{
@@ -64,10 +67,9 @@ class ExecutableFinder
$extraDirs
);
$suffixes = [];
$suffixes = $this->suffixes;
if ('\\' === \DIRECTORY_SEPARATOR) {
$pathExt = getenv('PATHEXT');
$suffixes = $this->suffixes;
$suffixes = array_merge($suffixes, $pathExt ? explode(\PATH_SEPARATOR, $pathExt) : ['.exe', '.bat', '.cmd', '.com']);
}
$suffixes = '' !== pathinfo($name, PATHINFO_EXTENSION) ? array_merge([''], $suffixes) : array_merge($suffixes, ['']);