mirror of
https://github.com/actions/setup-node.git
synced 2026-05-29 16:59:39 +00:00
Remove dummy NODE_AUTH_TOKEN export (#1558)
Co-authored-by: gowridurgad <gowridurgad@gmail.com>
This commit is contained in:
Vendored
+4
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user