Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Composer/Command/CreateProjectCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,13 @@ protected function installRootPackage(IOInterface $io, Config $config, string $p
$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
Expand Down