Skip to content

Commit

Permalink
Allow to define vendor and vendor-bin directories only with environme…
Browse files Browse the repository at this point in the history
…nt variables
  • Loading branch information
MacFJA authored and zdenekdrahos committed Feb 24, 2020
1 parent 53fe506 commit 4248e5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion phpqa
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
define('PHPQA_VERSION', '1.23.3');
define('PHPQA_USED_COMMAND', implode(' ', $argv));

if (file_exists(__DIR__ . '/vendor/autoload.php')) {
if (getenv('COMPOSER_BIN_DIR') && getenv('COMPOSER_VENDOR_DIR')) {
define('COMPOSER_VENDOR_DIR', getenv('COMPOSER_VENDOR_DIR'));
define('COMPOSER_BINARY_DIR', getenv('COMPOSER_BIN_DIR'));
} elseif (file_exists(__DIR__ . '/vendor/autoload.php')) {
define('COMPOSER_VENDOR_DIR', __DIR__ . "/vendor/");
define('COMPOSER_BINARY_DIR', __DIR__ . "/vendor/bin/");
} elseif (file_exists(__DIR__ . '/../../autoload.php')) {
Expand Down

0 comments on commit 4248e5d

Please sign in to comment.