fix auth GPR

This commit is contained in:
Valmir Barbosa 2019-09-25 04:00:45 -03:00
parent bdb28101ec
commit 6839971c6d

View file

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