From 4f7b6a3a5472fea38b661f323c82b96947fa1932 Mon Sep 17 00:00:00 2001 From: David Zuelke Date: Tue, 8 Aug 2017 18:04:11 +0200 Subject: [PATCH] use Factory::getComposerFile in ConfigCommand --- src/Composer/Command/ConfigCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index 1761402ee..ca8d4491e 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -146,7 +146,7 @@ EOT // passed in a file to use $configFile = $input->getOption('global') ? ($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` if ($configFile === 'composer.json' && !file_exists($configFile) && realpath(getcwd()) === realpath($this->config->get('home'))) {