mirror of
https://github.com/actions/setup-node.git
synced 2026-06-10 14:28:19 +01:00
Only use mirrorToken in getManifest if it's provided (#1548)
* Only use `mirrorToken` in `getManifest` if it's provided Signed-off-by: Timo Sand <timo.sand@f-secure.com> * `npm run build` Signed-off-by: Timo Sand <timo.sand@f-secure.com> --------- Signed-off-by: Timo Sand <timo.sand@f-secure.com>
This commit is contained in:
8
dist/setup/index.js
vendored
8
dist/setup/index.js
vendored
@@ -79822,7 +79822,9 @@ class OfficialBuilds extends base_distribution_1.default {
|
|||||||
const versionInfo = await this.getInfoFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, osArch, manifest);
|
const versionInfo = await this.getInfoFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, osArch, manifest);
|
||||||
if (versionInfo) {
|
if (versionInfo) {
|
||||||
core.info(`Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}`);
|
core.info(`Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}`);
|
||||||
downloadPath = await tc.downloadTool(versionInfo.downloadUrl, undefined, this.nodeInfo.mirror ? this.nodeInfo.mirrorToken : this.nodeInfo.auth);
|
downloadPath = await tc.downloadTool(versionInfo.downloadUrl, undefined, this.nodeInfo.mirror && this.nodeInfo.mirrorToken
|
||||||
|
? this.nodeInfo.mirrorToken
|
||||||
|
: this.nodeInfo.auth);
|
||||||
if (downloadPath) {
|
if (downloadPath) {
|
||||||
toolPath = await this.extractArchive(downloadPath, versionInfo, false);
|
toolPath = await this.extractArchive(downloadPath, versionInfo, false);
|
||||||
}
|
}
|
||||||
@@ -79893,7 +79895,9 @@ class OfficialBuilds extends base_distribution_1.default {
|
|||||||
}
|
}
|
||||||
getManifest() {
|
getManifest() {
|
||||||
core.debug('Getting manifest from actions/node-versions@main');
|
core.debug('Getting manifest from actions/node-versions@main');
|
||||||
return tc.getManifestFromRepo('actions', 'node-versions', this.nodeInfo.mirror ? this.nodeInfo.mirrorToken : this.nodeInfo.auth, 'main');
|
return tc.getManifestFromRepo('actions', 'node-versions', this.nodeInfo.mirror && this.nodeInfo.mirrorToken
|
||||||
|
? this.nodeInfo.mirrorToken
|
||||||
|
: this.nodeInfo.auth, 'main');
|
||||||
}
|
}
|
||||||
resolveLtsAliasFromManifest(versionSpec, stable, manifest) {
|
resolveLtsAliasFromManifest(versionSpec, stable, manifest) {
|
||||||
const alias = versionSpec.split('lts/')[1]?.toLowerCase();
|
const alias = versionSpec.split('lts/')[1]?.toLowerCase();
|
||||||
|
|||||||
@@ -84,7 +84,9 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||||||
downloadPath = await tc.downloadTool(
|
downloadPath = await tc.downloadTool(
|
||||||
versionInfo.downloadUrl,
|
versionInfo.downloadUrl,
|
||||||
undefined,
|
undefined,
|
||||||
this.nodeInfo.mirror ? this.nodeInfo.mirrorToken : this.nodeInfo.auth
|
this.nodeInfo.mirror && this.nodeInfo.mirrorToken
|
||||||
|
? this.nodeInfo.mirrorToken
|
||||||
|
: this.nodeInfo.auth
|
||||||
);
|
);
|
||||||
|
|
||||||
if (downloadPath) {
|
if (downloadPath) {
|
||||||
@@ -188,7 +190,9 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||||||
return tc.getManifestFromRepo(
|
return tc.getManifestFromRepo(
|
||||||
'actions',
|
'actions',
|
||||||
'node-versions',
|
'node-versions',
|
||||||
this.nodeInfo.mirror ? this.nodeInfo.mirrorToken : this.nodeInfo.auth,
|
this.nodeInfo.mirror && this.nodeInfo.mirrorToken
|
||||||
|
? this.nodeInfo.mirrorToken
|
||||||
|
: this.nodeInfo.auth,
|
||||||
'main'
|
'main'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user