@@ -62343,7 +62343,7 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
62343
62343
return __awaiter(this, void 0, void 0, function* () {
62344
62344
// Store manifest data to avoid multiple calls
62345
62345
let manifest;
62346
- let distManifest ;
62346
+ let nodeVersions ;
62347
62347
let osPlat = os.platform();
62348
62348
let osArch = translateArchToDistUrl(arch);
62349
62349
if (isLtsAlias(versionSpec)) {
@@ -62353,8 +62353,8 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
62353
62353
versionSpec = resolveLtsAliasFromManifest(versionSpec, stable, manifest);
62354
62354
}
62355
62355
if (isLatestSyntax(versionSpec)) {
62356
- distManifest = yield getVersionsFromDist();
62357
- versionSpec = yield queryDistForMatch(versionSpec, arch, distManifest );
62356
+ nodeVersions = yield getVersionsFromDist();
62357
+ versionSpec = yield queryDistForMatch(versionSpec, arch, nodeVersions );
62358
62358
core.info(`getting latest node version...`);
62359
62359
}
62360
62360
if (checkLatest) {
@@ -62408,7 +62408,7 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
62408
62408
// Download from nodejs.org
62409
62409
//
62410
62410
if (!downloadPath) {
62411
- info = yield getInfoFromDist(versionSpec, arch, distManifest );
62411
+ info = yield getInfoFromDist(versionSpec, arch, nodeVersions );
62412
62412
if (!info) {
62413
62413
throw new Error(`Unable to find Node version '${versionSpec}' for platform ${osPlat} and architecture ${osArch}.`);
62414
62414
}
@@ -62508,11 +62508,11 @@ function getInfoFromManifest(versionSpec, stable, auth, osArch = translateArchTo
62508
62508
return info;
62509
62509
});
62510
62510
}
62511
- function getInfoFromDist(versionSpec, arch = os.arch(), distManifest ) {
62511
+ function getInfoFromDist(versionSpec, arch = os.arch(), nodeVersions ) {
62512
62512
return __awaiter(this, void 0, void 0, function* () {
62513
62513
let osPlat = os.platform();
62514
62514
let osArch = translateArchToDistUrl(arch);
62515
- let version = yield queryDistForMatch(versionSpec, arch, distManifest );
62515
+ let version = yield queryDistForMatch(versionSpec, arch, nodeVersions );
62516
62516
if (!version) {
62517
62517
return null;
62518
62518
}
@@ -62571,7 +62571,7 @@ function evaluateVersions(versions, versionSpec) {
62571
62571
}
62572
62572
return version;
62573
62573
}
62574
- function queryDistForMatch(versionSpec, arch = os.arch(), distManifest ) {
62574
+ function queryDistForMatch(versionSpec, arch = os.arch(), nodeVersions ) {
62575
62575
return __awaiter(this, void 0, void 0, function* () {
62576
62576
let osPlat = os.platform();
62577
62577
let osArch = translateArchToDistUrl(arch);
@@ -62590,16 +62590,16 @@ function queryDistForMatch(versionSpec, arch = os.arch(), distManifest) {
62590
62590
default:
62591
62591
throw new Error(`Unexpected OS '${osPlat}'`);
62592
62592
}
62593
- if (!distManifest ) {
62593
+ if (!nodeVersions ) {
62594
62594
core.debug('No dist manifest cached');
62595
- distManifest = yield getVersionsFromDist();
62595
+ nodeVersions = yield getVersionsFromDist();
62596
62596
}
62597
62597
let versions = [];
62598
62598
if (isLatestSyntax(versionSpec)) {
62599
62599
core.info(`getting latest node version...`);
62600
- return distManifest [0].version;
62600
+ return nodeVersions [0].version;
62601
62601
}
62602
- distManifest .forEach((nodeVersion) => {
62602
+ nodeVersions .forEach((nodeVersion) => {
62603
62603
// ensure this version supports your os and platform
62604
62604
if (nodeVersion.files.indexOf(dataFileName) >= 0) {
62605
62605
versions.push(nodeVersion.version);
0 commit comments