|
|
@ -576,7 +576,7 @@ class EventDispatcher
|
|
|
|
$binDir = $this->composer->getConfig()->get('bin-dir');
|
|
|
|
$binDir = $this->composer->getConfig()->get('bin-dir');
|
|
|
|
if (is_dir($binDir)) {
|
|
|
|
if (is_dir($binDir)) {
|
|
|
|
$binDir = realpath($binDir);
|
|
|
|
$binDir = realpath($binDir);
|
|
|
|
$pathValue = Platform::getEnv($pathEnv);
|
|
|
|
$pathValue = (string) Platform::getEnv($pathEnv);
|
|
|
|
if (!Preg::isMatch('{(^|'.PATH_SEPARATOR.')'.preg_quote($binDir).'($|'.PATH_SEPARATOR.')}', $pathValue)) {
|
|
|
|
if (!Preg::isMatch('{(^|'.PATH_SEPARATOR.')'.preg_quote($binDir).'($|'.PATH_SEPARATOR.')}', $pathValue)) {
|
|
|
|
Platform::putEnv($pathEnv, $binDir.PATH_SEPARATOR.$pathValue);
|
|
|
|
Platform::putEnv($pathEnv, $binDir.PATH_SEPARATOR.$pathValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|