1
0
Fork 0
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:
Martin Jesper Low Madsen 2019-11-07 16:39:11 +01:00
parent 6ecfd2dcb2
commit c50e8fd92e

View file

@ -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');
}