diff --git a/lib/workers/repository/init/config.js b/lib/workers/repository/init/config.js index a2313a0baff7885401828d98a20a3f697e809c6f..5205bb86444115927f5c123dbb69e7efefbf8fc5 100644 --- a/lib/workers/repository/init/config.js +++ b/lib/workers/repository/init/config.js @@ -22,12 +22,6 @@ async function mergeRenovateConfig(config) { logger.debug({ renovateJson }, 'mirrorMode config'); const migratedConfig = await migrateAndValidate(config, renovateJson); const resolvedConfig = await presets.resolveConfigPresets(migratedConfig); - if (resolvedConfig.npmrc) { - logger.debug( - 'Ignoring any .npmrc files in repository due to configured npmrc' - ); - resolvedConfig.ignoreNpmrcFile = true; - } returnConfig = mergeChildConfig(returnConfig, resolvedConfig); returnConfig.renovateJsonPresent = true; return returnConfig; @@ -139,6 +133,13 @@ async function mergeRenovateConfig(config) { ); delete resolvedConfig.privateKey; logger.trace({ config: resolvedConfig }, 'resolved config'); + // istanbul ignore if + if (resolvedConfig.npmrc) { + logger.debug( + 'Ignoring any .npmrc files in repository due to configured npmrc' + ); + resolvedConfig.ignoreNpmrcFile = true; + } returnConfig = mergeChildConfig(returnConfig, resolvedConfig); returnConfig.renovateJsonPresent = true; returnConfig.packageRules = flattenPackageRules(returnConfig.packageRules);