1
0
Fork 0
mirror of https://github.com/actions/setup-node synced 2025-04-09 18:35:51 +00:00

fix auth GPR

This commit is contained in:
Valmir Barbosa 2019-09-25 03:59:49 -03:00
parent 2c67fce0c8
commit bdb28101ec
2 changed files with 5 additions and 3 deletions

View file

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

View file

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