Skip to content
Snippets Groups Projects
Commit 9fb25cb4 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(npm): strip trailing \n from npmToken

parent 4cfc4e76
No related branches found
No related tags found
Loading
...@@ -20,9 +20,9 @@ function decryptConfig(config, privateKey) { ...@@ -20,9 +20,9 @@ function decryptConfig(config, privateKey) {
.toString(); .toString();
logger.info(`Decrypted ${eKey}`); logger.info(`Decrypted ${eKey}`);
if (eKey === 'npmToken') { if (eKey === 'npmToken') {
const token = maskToken(decryptedStr); const token = decryptedStr.replace(/\n$/, '');
logger.info({ token }, 'Migrating npmToken to npmrc'); logger.info({ token: maskToken(token) }, 'Migrating npmToken to npmrc');
decryptedConfig.npmrc = `//registry.npmjs.org/:_authToken=${decryptedStr}\n`; decryptedConfig.npmrc = `//registry.npmjs.org/:_authToken=${token}\n`;
} else { } else {
decryptedConfig[eKey] = decryptedStr; decryptedConfig[eKey] = decryptedStr;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment