Load default config in with other configs
parent
9c109dfea1
commit
6ce11697ec
|
@ -200,6 +200,16 @@ class Factory
|
||||||
}
|
}
|
||||||
$config->setAuthConfigSource(new JsonConfigSource($file, true));
|
$config->setAuthConfigSource(new JsonConfigSource($file, true));
|
||||||
|
|
||||||
|
// load global auth file
|
||||||
|
$file = new JsonFile($config->get('home').'/defaults.json');
|
||||||
|
if ($file->exists()) {
|
||||||
|
if ($io && $io->isDebug()) {
|
||||||
|
$io->writeError('Loading config file ' . $file->getPath());
|
||||||
|
}
|
||||||
|
$config->merge(array('config' => $file->read()));
|
||||||
|
}
|
||||||
|
$config->setDefaultsConfigSource(new JsonConfigSource($file, true));
|
||||||
|
|
||||||
// load COMPOSER_AUTH environment variable if set
|
// load COMPOSER_AUTH environment variable if set
|
||||||
if ($composerAuthEnv = getenv('COMPOSER_AUTH')) {
|
if ($composerAuthEnv = getenv('COMPOSER_AUTH')) {
|
||||||
$authData = json_decode($composerAuthEnv, true);
|
$authData = json_decode($composerAuthEnv, true);
|
||||||
|
|
Loading…
Reference in New Issue