From b6e7624bf6cc8aab2c6ed1412de4188aa715b88e Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Tue, 29 Jul 2014 16:23:48 +0100 Subject: [PATCH] Adding the ability to use a project's composer bin directory even if it isn't defined in the composer.json (/vendor/bin) --- PHPCI/Helper/BaseCommandExecutor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PHPCI/Helper/BaseCommandExecutor.php b/PHPCI/Helper/BaseCommandExecutor.php index 554d9083..d5984a06 100644 --- a/PHPCI/Helper/BaseCommandExecutor.php +++ b/PHPCI/Helper/BaseCommandExecutor.php @@ -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'; } } }