mirror of
https://github.com/actions/setup-node
synced 2025-04-09 02:15:52 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue