mirror of
https://github.com/actions/setup-node.git
synced 2025-04-20 03:13:34 +00:00
Only override NODE_AUTH_TOKEN with a placeholder if it isn't already set, e.g. in jobs.<job_id>.env
This commit is contained in:
parent
6ecfd2dcb2
commit
c50e8fd92e
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user