From c50e8fd92e5ffea1e09418873a78d0b8eda39c8b Mon Sep 17 00:00:00 2001 From: Martin Jesper Low Madsen Date: Thu, 7 Nov 2019 16:39:11 +0100 Subject: [PATCH] Only override NODE_AUTH_TOKEN with a placeholder if it isn't already set, e.g. in jobs..env --- lib/authutil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/authutil.js b/lib/authutil.js index 6da4630b..455ee161 100644 --- a/lib/authutil.js +++ b/lib/authutil.js @@ -52,5 +52,5 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) { fs.writeFileSync(fileLocation, newContents); core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation); // Export empty node_auth_token so npm doesn't complain about not being able to find it - core.exportVariable('NODE_AUTH_TOKEN', 'XXXXX-XXXXX-XXXXX-XXXXX'); + core.exportVariable('NODE_AUTH_TOKEN', process.env.NODE_AUTH_TOKEN || 'XXXXX-XXXXX-XXXXX-XXXXX'); }