Fix composer global config handling
parent
a4d84f15ca
commit
0f94dcd848
|
@ -149,7 +149,11 @@ EOT
|
|||
: ($input->getOption('file') ?: Factory::getComposerFile());
|
||||
|
||||
// Create global composer.json if this was invoked using `composer global config`
|
||||
if ($configFile === 'composer.json' && !file_exists($configFile) && realpath(getcwd()) === realpath($this->config->get('home'))) {
|
||||
if (
|
||||
($configFile === 'composer.json' || $configFile === './composer.json')
|
||||
&& !file_exists($configFile)
|
||||
&& realpath(getcwd()) === realpath($this->config->get('home'))
|
||||
) {
|
||||
file_put_contents($configFile, "{\n}\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue