1
0
Fork 0

Avoid COMPOSER env being set if not necessary as it can cause issues with scripts, fixes #11613, refs #11493

pull/11620/head
Jordi Boggiano 2023-09-03 11:13:54 +02:00
parent 90cbb144b2
commit 98a588eb90
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 2 deletions

View File

@ -472,8 +472,8 @@ EOT
// ensure that the env var being set does not interfere with create-project // 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 // 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 // in the project
if (file_exists($directory.'/composer.json')) { if (file_exists($directory.'/composer.json') && Platform::getEnv('COMPOSER') !== false) {
Platform::putEnv('COMPOSER', $directory.'/composer.json'); Platform::clearEnv('COMPOSER');
} }
Platform::putEnv('COMPOSER_ROOT_VERSION', $package->getPrettyVersion()); Platform::putEnv('COMPOSER_ROOT_VERSION', $package->getPrettyVersion());