Avoid COMPOSER env being set if not necessary as it can cause issues with scripts, fixes #11613, refs #11493
parent
90cbb144b2
commit
98a588eb90
|
@ -472,8 +472,8 @@ EOT
|
|||
// ensure that the env var being set does not interfere with create-project
|
||||
// as it is probably not meant to be used here, so we do not use it if a composer.json can be found
|
||||
// in the project
|
||||
if (file_exists($directory.'/composer.json')) {
|
||||
Platform::putEnv('COMPOSER', $directory.'/composer.json');
|
||||
if (file_exists($directory.'/composer.json') && Platform::getEnv('COMPOSER') !== false) {
|
||||
Platform::clearEnv('COMPOSER');
|
||||
}
|
||||
|
||||
Platform::putEnv('COMPOSER_ROOT_VERSION', $package->getPrettyVersion());
|
||||
|
|
Loading…
Reference in New Issue