mirror of
https://github.com/actions/setup-node
synced 2025-04-20 07:03:11 +00:00
fix auth GPR
This commit is contained in:
parent
2c67fce0c8
commit
bdb28101ec
@ -43,7 +43,8 @@ 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+:|^)/, '') + ':_authToken=${NODE_AUTH_TOKEN}';
|
const authString = registryUrl.replace(/(^\w+:|^)/, '')
|
||||||
|
+ ':_authToken=' + process.env['NODE_AUTH_TOKEN'];
|
||||||
const registryString = scope
|
const registryString = scope
|
||||||
? `${scope}:registry=${registryUrl}`
|
? `${scope}:registry=${registryUrl}`
|
||||||
: `registry=${registryUrl}`;
|
: `registry=${registryUrl}`;
|
||||||
|
@ -45,8 +45,9 @@ function writeRegistryToFile(
|
|||||||
}
|
}
|
||||||
// Remove http: or https: from front of registry.
|
// Remove http: or https: from front of registry.
|
||||||
const authString: string =
|
const authString: string =
|
||||||
registryUrl.replace(/(^\w+:|^)/, '')
|
registryUrl.replace(/(^\w+:|^)/, '') +
|
||||||
+ ':_authToken=' + process.env['NODE_AUTH_TOKEN'];
|
':_authToken=' +
|
||||||
|
process.env['NODE_AUTH_TOKEN'];
|
||||||
const registryString: string = scope
|
const registryString: string = scope
|
||||||
? `${scope}:registry=${registryUrl}`
|
? `${scope}:registry=${registryUrl}`
|
||||||
: `registry=${registryUrl}`;
|
: `registry=${registryUrl}`;
|
||||||
|
Loading…
Reference in New Issue
Block a user