@@ -62343,7 +62343,7 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
6234362343 return __awaiter(this, void 0, void 0, function* () {
6234462344 // Store manifest data to avoid multiple calls
6234562345 let manifest;
62346- let distManifest ;
62346+ let nodeVersions ;
6234762347 let osPlat = os.platform();
6234862348 let osArch = translateArchToDistUrl(arch);
6234962349 if (isLtsAlias(versionSpec)) {
@@ -62353,8 +62353,8 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
6235362353 versionSpec = resolveLtsAliasFromManifest(versionSpec, stable, manifest);
6235462354 }
6235562355 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 );
6235862358 core.info(`getting latest node version...`);
6235962359 }
6236062360 if (checkLatest) {
@@ -62408,7 +62408,7 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
6240862408 // Download from nodejs.org
6240962409 //
6241062410 if (!downloadPath) {
62411- info = yield getInfoFromDist(versionSpec, arch, distManifest );
62411+ info = yield getInfoFromDist(versionSpec, arch, nodeVersions );
6241262412 if (!info) {
6241362413 throw new Error(`Unable to find Node version '${versionSpec}' for platform ${osPlat} and architecture ${osArch}.`);
6241462414 }
@@ -62508,11 +62508,11 @@ function getInfoFromManifest(versionSpec, stable, auth, osArch = translateArchTo
6250862508 return info;
6250962509 });
6251062510}
62511- function getInfoFromDist(versionSpec, arch = os.arch(), distManifest ) {
62511+ function getInfoFromDist(versionSpec, arch = os.arch(), nodeVersions ) {
6251262512 return __awaiter(this, void 0, void 0, function* () {
6251362513 let osPlat = os.platform();
6251462514 let osArch = translateArchToDistUrl(arch);
62515- let version = yield queryDistForMatch(versionSpec, arch, distManifest );
62515+ let version = yield queryDistForMatch(versionSpec, arch, nodeVersions );
6251662516 if (!version) {
6251762517 return null;
6251862518 }
@@ -62571,7 +62571,7 @@ function evaluateVersions(versions, versionSpec) {
6257162571 }
6257262572 return version;
6257362573}
62574- function queryDistForMatch(versionSpec, arch = os.arch(), distManifest ) {
62574+ function queryDistForMatch(versionSpec, arch = os.arch(), nodeVersions ) {
6257562575 return __awaiter(this, void 0, void 0, function* () {
6257662576 let osPlat = os.platform();
6257762577 let osArch = translateArchToDistUrl(arch);
@@ -62590,16 +62590,16 @@ function queryDistForMatch(versionSpec, arch = os.arch(), distManifest) {
6259062590 default:
6259162591 throw new Error(`Unexpected OS '${osPlat}'`);
6259262592 }
62593- if (!distManifest ) {
62593+ if (!nodeVersions ) {
6259462594 core.debug('No dist manifest cached');
62595- distManifest = yield getVersionsFromDist();
62595+ nodeVersions = yield getVersionsFromDist();
6259662596 }
6259762597 let versions = [];
6259862598 if (isLatestSyntax(versionSpec)) {
6259962599 core.info(`getting latest node version...`);
62600- return distManifest [0].version;
62600+ return nodeVersions [0].version;
6260162601 }
62602- distManifest .forEach((nodeVersion) => {
62602+ nodeVersions .forEach((nodeVersion) => {
6260362603 // ensure this version supports your os and platform
6260462604 if (nodeVersion.files.indexOf(dataFileName) >= 0) {
6260562605 versions.push(nodeVersion.version);
0 commit comments