diff --git a/Tasks/NodeToolV0/nodetool.ts b/Tasks/NodeToolV0/nodetool.ts index cd469e8f58b3..a9b289b33eee 100644 --- a/Tasks/NodeToolV0/nodetool.ts +++ b/Tasks/NodeToolV0/nodetool.ts @@ -5,7 +5,7 @@ import * as os from 'os'; import * as path from 'path'; let osPlat: string = os.platform(); -let osArch: string = os.arch(); +let osArch: string = getArch(); async function run() { try { @@ -122,8 +122,8 @@ async function acquireNode(version: string): Promise { // Download - a tool installer intimately knows how to get the tool (and construct urls) // version = toolLib.cleanVersion(version); - let fileName: string = osPlat == 'win32'? 'node-v' + version + '-win-' + os.arch() : - 'node-v' + version + '-' + osPlat + '-' + os.arch(); + let fileName: string = osPlat == 'win32'? 'node-v' + version + '-win-' + osArch : + 'node-v' + version + '-' + osPlat + '-' + osArch; let urlFileName: string = osPlat == 'win32'? fileName + '.7z': fileName + '.tar.gz'; @@ -191,8 +191,8 @@ async function acquireNodeFromFallbackLocation(version: string): Promise let exeUrl: string; let libUrl: string; try { - exeUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.exe`; - libUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.lib`; + exeUrl = `https://nodejs.org/dist/v${version}/win-${osArch}/node.exe`; + libUrl = `https://nodejs.org/dist/v${version}/win-${osArch}/node.lib`; await toolLib.downloadTool(exeUrl, path.join(tempDir, "node.exe")); await toolLib.downloadTool(libUrl, path.join(tempDir, "node.lib")); @@ -214,4 +214,12 @@ async function acquireNodeFromFallbackLocation(version: string): Promise return await toolLib.cacheDir(tempDir, 'node', version); } +function getArch(): string { + let arch: string = os.arch(); + if (arch === 'ia32') { + arch = 'x86'; + } + return arch; +} + run(); diff --git a/Tasks/NodeToolV0/task.json b/Tasks/NodeToolV0/task.json index 797fac8ec953..3204ac9b00f6 100644 --- a/Tasks/NodeToolV0/task.json +++ b/Tasks/NodeToolV0/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 1 + "Minor": 159, + "Patch": 0 }, "satisfies": [ "Node", diff --git a/Tasks/NodeToolV0/task.loc.json b/Tasks/NodeToolV0/task.loc.json index 8b5a58210674..4ce0d8c74640 100644 --- a/Tasks/NodeToolV0/task.loc.json +++ b/Tasks/NodeToolV0/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 1 + "Minor": 159, + "Patch": 0 }, "satisfies": [ "Node",