[Bridge/PhpUnit] fix looking for composer

This commit is contained in:
Nicolas Grekas 2019-09-02 20:32:45 +02:00
parent 33e466577f
commit 62020ab91f

View File

@ -57,7 +57,9 @@ foreach ($defaultEnvs as $envName => $envValue) {
}
}
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`))
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar')
|| ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`))
|| ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer`) : `which composer 2> /dev/null`))
? $PHP.' '.escapeshellarg($COMPOSER)
: 'composer';