function ProcessExecutor::getExecutable
Resolves executable paths on Windows
1 call to ProcessExecutor::getExecutable()
- ProcessExecutor::runProcess in vendor/
composer/ composer/ src/ Composer/ Util/ ProcessExecutor.php
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ ProcessExecutor.php, line 580
Class
- ProcessExecutor
- @author Robert Schönthal <seroscho@googlemail.com> @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\UtilCode
private static function getExecutable(string $name) : string {
if (\in_array(strtolower($name), self::BUILTIN_CMD_COMMANDS, true)) {
return $name;
}
if (!isset(self::$executables[$name])) {
$path = (new ExecutableFinder())->find($name, $name);
if ($path !== null) {
self::$executables[$name] = $path;
}
}
return self::$executables[$name] ?? $name;
}