Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/Composer/Command/ConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ protected function initialize(InputInterface $input, OutputInterface $output): v
$io = $this->getIO();
$this->config = Factory::createConfig($io);

// When using --global flag, set baseDir to home directory for correct absolute path resolution
if ($input->getOption('global')) {
$this->config->setBaseDir($this->config->get('home'));
}

$configFile = $this->getComposerConfigFile($input, $this->config);

// Create global composer.json if this was invoked using `composer global config`
Expand Down
Loading