From f542b0f32d044a9cc958510303b299685f7e7cc1 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 26 Mar 2016 09:49:28 +0000 Subject: [PATCH] Only use Path if it is actually available, refs #5114 --- src/Composer/EventDispatcher/EventDispatcher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/EventDispatcher/EventDispatcher.php b/src/Composer/EventDispatcher/EventDispatcher.php index 65ee752dd..70a370722 100644 --- a/src/Composer/EventDispatcher/EventDispatcher.php +++ b/src/Composer/EventDispatcher/EventDispatcher.php @@ -146,10 +146,10 @@ class EventDispatcher protected function doDispatch(Event $event) { $pathStr = 'PATH'; - if (!isset($_SERVER[$pathStr])) { + if (!isset($_SERVER[$pathStr]) && isset($_SERVER['Path'])) { $pathStr = 'Path'; } - + // add the bin dir to the PATH to make local binaries of deps usable in scripts $binDir = $this->composer->getConfig()->get('bin-dir'); if (is_dir($binDir)) {