Skip to content

Commit b97a7ff

Browse files
authored
fix(pre_install): correct version check for apple silicon compatibility (#21)
Update the version check logic to properly handle Node.js versions below 16 for Apple Silicon devices
1 parent a799e08 commit b97a7ff

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

hooks/pre_install.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ function PLUGIN:PreInstall(ctx)
3333
ext = ".zip"
3434
osType = "win"
3535
end
36-
-- add logic for macOS M1~
36+
-- add logic for Apple Silicon
3737
if RUNTIME.osType == "darwin" then
3838
local major, _ = util.extract_semver(version)
39-
if major and tonumber(major) <= 16 then
39+
if major and tonumber(major) < 16 then
4040
arch_type = "x64"
41+
print("Note: Node.js versions below 16 do not support Apple Silicon (arm64), using x64 architecture with Rosetta 2")
4142
end
4243
end
4344

0 commit comments

Comments
 (0)