From f2d1671d60f491c44ea9f2f2d98980eccec307b0 Mon Sep 17 00:00:00 2001 From: Mahdi Sharifi Date: Sun, 7 Apr 2024 16:26:52 +0330 Subject: [PATCH] Fix a minor bug in the previous commit --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 1a73c49..5b60835 100644 --- a/index.js +++ b/index.js @@ -8,10 +8,10 @@ const threadCount = coreCount * 2; let CC = process.env.CC; let CXX = process.env.CXX; -let ARCH = process.env.CXX; +let ARCH = process.env.ARCH; if (!CC) CC = "gcc"; if (!CXX) CXX = "g++"; -if (!ARCH) ARCH = "x64"; +if (!ARCH) ARCH = "amd64"; const nodejsGithubRepo = "https://github.com/nodejs/node"; const removeTheVCharacter = (str) => str.replace("v", ""); @@ -80,6 +80,6 @@ if (process.platform == "linux") { await spawnAsync("./configure", ["--ninja", "--shared"], "node"); await spawnAsync("make", [`-j${threadCount}`], "node"); } else if (process.platform == "win32") { - const arch = ARCH == "x64" ? "x64" : "arm64"; + const arch = ARCH == "amd64" ? "x64" : "arm64"; await spawnAsync("vcbuild.bat", [arch, "dll"], "node"); }