From 9dc6490403ef35c72a36694f6cae40283ca36efe Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 17 May 2016 22:28:20 +0100 Subject: [PATCH] Override the config source with the local one as it should be --- src/Composer/Factory.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index 1e594900c..460ca362a 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -286,7 +286,9 @@ class Factory $config->merge($localConfig); if (isset($composerFile)) { $io->writeError('Loading config file ' . $composerFile, true, IOInterface::DEBUG); - $localAuthFile = new JsonFile(dirname(realpath($composerFile)) . '/auth.json'); + $config->setConfigSource(new JsonConfigSource(new JsonFile(realpath($composerFile), null, $io))); + + $localAuthFile = new JsonFile(dirname(realpath($composerFile)) . '/auth.json', null, $io); if ($localAuthFile->exists()) { $io->writeError('Loading config file ' . $localAuthFile->getPath(), true, IOInterface::DEBUG); $config->merge(array('config' => $localAuthFile->read()));