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
No related merge requests found
......@@ -20,9 +20,9 @@ function decryptConfig(config, privateKey) {
.toString();
logger.info(`Decrypted ${eKey}`);
if (eKey === 'npmToken') {
const token = maskToken(decryptedStr);
logger.info({ token }, 'Migrating npmToken to npmrc');
decryptedConfig.npmrc = `//registry.npmjs.org/:_authToken=${decryptedStr}\n`;
const token = decryptedStr.replace(/\n$/, '');
logger.info({ token: maskToken(token) }, 'Migrating npmToken to npmrc');
decryptedConfig.npmrc = `//registry.npmjs.org/:_authToken=${token}\n`;
} else {
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