mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
fix(npm): handle npmrc newline characters
Replace \n chars with newlines in npmrc before sending to ini.parse(). Closes #3417
This commit is contained in:
parent
4379c4c2ac
commit
5d74650195
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ function setNpmrc(input) {
|
||||||
const existingNpmrc = npmrc;
|
const existingNpmrc = npmrc;
|
||||||
npmrcRaw = input;
|
npmrcRaw = input;
|
||||||
logger.debug('Setting npmrc');
|
logger.debug('Setting npmrc');
|
||||||
npmrc = ini.parse(input);
|
npmrc = ini.parse(input.replace(/\\n/g, '\n'));
|
||||||
// massage _auth to _authToken
|
// massage _auth to _authToken
|
||||||
for (const [key, val] of Object.entries(npmrc)) {
|
for (const [key, val] of Object.entries(npmrc)) {
|
||||||
// istanbul ignore if
|
// istanbul ignore if
|
||||||
|
|
Loading…
Reference in a new issue