mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
refactor: resolve configs immediately
This commit is contained in:
parent
12519bbf8f
commit
2decb37a1d
1 changed files with 7 additions and 10 deletions
|
@ -36,17 +36,14 @@ async function parseConfigs(env, argv) {
|
|||
logger.debug('Parsing configs');
|
||||
|
||||
// Get configs
|
||||
const defaultConfig = defaultsParser.getConfig();
|
||||
const fileConfig = fileParser.getConfig(env);
|
||||
const cliConfig = cliParser.getConfig(argv);
|
||||
const envConfig = envParser.getConfig(env);
|
||||
const defaultConfig = await resolveConfigPresets(defaultsParser.getConfig());
|
||||
const fileConfig = await resolveConfigPresets(fileParser.getConfig(env));
|
||||
const cliConfig = await resolveConfigPresets(cliParser.getConfig(argv));
|
||||
const envConfig = await resolveConfigPresets(envParser.getConfig(env));
|
||||
|
||||
let config = mergeChildConfig(
|
||||
await resolveConfigPresets(defaultConfig),
|
||||
await resolveConfigPresets(fileConfig)
|
||||
);
|
||||
config = mergeChildConfig(config, await resolveConfigPresets(envConfig));
|
||||
config = mergeChildConfig(config, await resolveConfigPresets(cliConfig));
|
||||
let config = mergeChildConfig(defaultConfig, fileConfig);
|
||||
config = mergeChildConfig(config, envConfig);
|
||||
config = mergeChildConfig(config, cliConfig);
|
||||
|
||||
// Set log level
|
||||
logger.levels('stdout', config.logLevel);
|
||||
|
|
Loading…
Reference in a new issue