Remove dummy NODE_AUTH_TOKEN export (#1558)

Co-authored-by: gowridurgad <gowridurgad@gmail.com>
This commit is contained in:
gowridurgad
2026-05-28 08:26:31 +05:30
committed by GitHub
parent ad1b57eb81
commit 0355742c94
3 changed files with 29 additions and 7 deletions
+4 -2
View File
@@ -78875,8 +78875,10 @@ function writeRegistryToFile(registryUrl, fileLocation) {
newContents += `${authString}${os.EOL}${registryString}`;
fs.writeFileSync(fileLocation, newContents);
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
// Export empty node_auth_token if didn't exist so npm doesn't complain about not being able to find it
core.exportVariable('NODE_AUTH_TOKEN', process.env.NODE_AUTH_TOKEN || 'XXXXX-XXXXX-XXXXX-XXXXX');
// Only export NODE_AUTH_TOKEN if explicitly provided by user
if (Object.prototype.hasOwnProperty.call(process.env, 'NODE_AUTH_TOKEN')) {
core.exportVariable('NODE_AUTH_TOKEN', process.env.NODE_AUTH_TOKEN);
}
}