From ba449c7b1796340d18779e1ccb9c6f6492725db1 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 25 Mar 2021 22:12:51 +0100 Subject: [PATCH] fix(npm): ignoreNpmrcFile per-package Closes #9280 --- lib/manager/npm/post-update/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/manager/npm/post-update/index.ts b/lib/manager/npm/post-update/index.ts index d51800d9b3..62305f5d49 100644 --- a/lib/manager/npm/post-update/index.ts +++ b/lib/manager/npm/post-update/index.ts @@ -144,6 +144,9 @@ export async function writeExistingFiles( } catch (err) /* istanbul ignore next */ { logger.warn({ npmrcFilename, err }, 'Error writing .npmrc'); } + } else if (config.ignoreNpmrcFile) { + logger.debug('Removing ignored .npmrc file before artifact generation'); + await remove(npmrcFilename); } if (packageFile.yarnrc) { logger.debug(`Writing .yarnrc to ${basedir}`); -- GitLab