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');
|
logger.debug('Parsing configs');
|
||||||
|
|
||||||
// Get configs
|
// Get configs
|
||||||
const defaultConfig = defaultsParser.getConfig();
|
const defaultConfig = await resolveConfigPresets(defaultsParser.getConfig());
|
||||||
const fileConfig = fileParser.getConfig(env);
|
const fileConfig = await resolveConfigPresets(fileParser.getConfig(env));
|
||||||
const cliConfig = cliParser.getConfig(argv);
|
const cliConfig = await resolveConfigPresets(cliParser.getConfig(argv));
|
||||||
const envConfig = envParser.getConfig(env);
|
const envConfig = await resolveConfigPresets(envParser.getConfig(env));
|
||||||
|
|
||||||
let config = mergeChildConfig(
|
let config = mergeChildConfig(defaultConfig, fileConfig);
|
||||||
await resolveConfigPresets(defaultConfig),
|
config = mergeChildConfig(config, envConfig);
|
||||||
await resolveConfigPresets(fileConfig)
|
config = mergeChildConfig(config, cliConfig);
|
||||||
);
|
|
||||||
config = mergeChildConfig(config, await resolveConfigPresets(envConfig));
|
|
||||||
config = mergeChildConfig(config, await resolveConfigPresets(cliConfig));
|
|
||||||
|
|
||||||
// Set log level
|
// Set log level
|
||||||
logger.levels('stdout', config.logLevel);
|
logger.levels('stdout', config.logLevel);
|
||||||
|
|
Loading…
Reference in a new issue