1
0
Fork 0

Force CreateProjectCommand to use the installed composer.json (#11493)

pull/11499/head
Andreas Schempp 2023-06-07 12:44:50 +02:00 committed by GitHub
parent 44c5e2e628
commit ebd0a60411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -469,6 +469,13 @@ EOT
$io->writeError('<info>Created project in ' . $directory . '</info>');
chdir($directory);
// 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');
}
Platform::putEnv('COMPOSER_ROOT_VERSION', $package->getPrettyVersion());
// once the root project is fully initialized, we do not need to wipe everything on user abort anymore even if it happens during deps install