Skip to content

Commit f17d4e2

Browse files
committed
fix ARM detection not detecting arm64, replace vim.loop with vim.uv
1 parent eaaf3e8 commit f17d4e2

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

lua/defold/service/os.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function M.command_exists(cmd)
2121
end
2222

2323
function M.name()
24-
local os_name = vim.loop.os_uname().sysname:lower()
24+
local os_name = vim.uv.os_uname().sysname:lower()
2525

2626
if os_name == "darwin" then
2727
return "macos"
@@ -51,11 +51,17 @@ function M.is_macos()
5151
end
5252

5353
function M.architecture()
54-
local machine = vim.loop.os_uname().machine
54+
local machine = vim.uv.os_uname().machine
5555

5656
if machine == "x86_64" then
5757
return "amd64"
58-
elseif machine == "aarch64_be" or machine == "aarch64" or machine == "armv8b" or machine == "armv8l" then
58+
elseif
59+
machine == "aarch64"
60+
or machine == "aarch64_be"
61+
or machine == "arm64"
62+
or machine == "armv8b"
63+
or machine == "armv8l"
64+
then
5965
return "aarch64"
6066
else
6167
return "unknown"

0 commit comments

Comments
 (0)