Skip to content

Commit 3eb4bc9

Browse files
committed
feat: add arch to acquireNodeFromFallbackLocation
1 parent bf47dec commit 3eb4bc9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/installer.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ export async function getNode(
107107
downloadPath = await tc.downloadTool(info.downloadUrl);
108108
} catch (err) {
109109
if (err instanceof tc.HTTPError && err.httpStatusCode == 404) {
110-
return await acquireNodeFromFallbackLocation(info.resolvedVersion);
110+
return await acquireNodeFromFallbackLocation(
111+
info.resolvedVersion,
112+
info.arch
113+
);
111114
}
112115

113116
throw err;
@@ -317,10 +320,11 @@ export async function getVersionsFromDist(): Promise<INodeVersion[]> {
317320
// Note also that the files are normally zipped but in this case they are just an exe
318321
// and lib file in a folder, not zipped.
319322
async function acquireNodeFromFallbackLocation(
320-
version: string
323+
version: string,
324+
arch: string = os.arch()
321325
): Promise<string> {
322326
let osPlat: string = os.platform();
323-
let osArch: string = translateArchToDistUrl(os.arch());
327+
let osArch: string = translateArchToDistUrl(arch);
324328

325329
// Create temporary folder to download in to
326330
const tempDownloadFolder: string =

0 commit comments

Comments
 (0)