Adding the ability to use a project's composer bin directory even if it isn't defined in the composer.json (/vendor/bin)
This commit is contained in:
parent
7137e3921f
commit
b6e7624bf6
|
@ -170,8 +170,11 @@ abstract class BaseCommandExecutor implements CommandExecutor
|
|||
$composer = $path.'/composer.json';
|
||||
if (is_file($composer)) {
|
||||
$json = json_decode(file_get_contents($composer));
|
||||
|
||||
if (isset($json->config->{"bin-dir"})) {
|
||||
return $path.'/'.$json->config->{"bin-dir"};
|
||||
} elseif (is_dir($path . '/vendor/bin')) {
|
||||
return $path . '/vendor/bin';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue