1
0
Fork 0
mirror of https://github.com/actions/setup-node synced 2024-12-23 13:42:42 +00:00

Fix string interpolation for auth token.

This commit is contained in:
Iheanyi Ekechukwu 2019-08-06 11:19:12 -04:00 committed by GitHub
parent da3e59948e
commit f20c85e5e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ function writeRegistryToFile(registryUrl: string, fileLocation: string) {
} }
// Remove http: or https: from front of registry. // Remove http: or https: from front of registry.
const authString = const authString =
registryUrl.replace(/(^\w+:|^)/, '') + ':_authToken=${NODE_AUTH_TOKEN}'; registryUrl.replace(/(^\w+:|^)/, '') + `:_authToken=${NODE_AUTH_TOKEN}`;
const registryString = scope const registryString = scope
? `${scope}:registry=${registryUrl}` ? `${scope}:registry=${registryUrl}`
: `registry=${registryUrl}`; : `registry=${registryUrl}`;