Skip to content

Commit

Permalink
prefer local composer installed executables over global
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Aug 26, 2016
1 parent d4fb263 commit 3e31dff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Common/ExecCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ protected function findExecutablePhar($cmd)
*/
protected function findExecutable($cmd)
{
$localComposerInstallation = 'vendor' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . $cmd;
if (file_exists($localComposerInstallation)) {
return $localComposerInstallation;
}
$finder = new ExecutableFinder();
$pathToCmd = $finder->find($cmd, null, ['vendor/bin']);
$pathToCmd = $finder->find($cmd, null, [getcwd() . 'vendor/bin']);

if ($pathToCmd) {
return $this->useCallOnWindows($pathToCmd);
Expand Down

0 comments on commit 3e31dff

Please sign in to comment.