1
0
Fork 0

use Factory::getComposerFile in ConfigCommand

pull/6598/head
David Zuelke 2017-08-08 18:04:11 +02:00 committed by Jordi Boggiano
parent f420d31233
commit 4f7b6a3a54
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ EOT
// passed in a file to use // passed in a file to use
$configFile = $input->getOption('global') $configFile = $input->getOption('global')
? ($this->config->get('home') . '/config.json') ? ($this->config->get('home') . '/config.json')
: ($input->getOption('file') ?: trim(getenv('COMPOSER')) ?: 'composer.json'); : ($input->getOption('file') ?: Factory::getComposerFile());
// Create global composer.json if this was invoked using `composer global config` // 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' && !file_exists($configFile) && realpath(getcwd()) === realpath($this->config->get('home'))) {