Update system arch discovery method

This commit is contained in:
Craig Everett 2025-08-14 10:41:52 +09:00
parent 5e3e8c9eae
commit 56be96c4f3

View File

@ -283,11 +283,13 @@ platform_dir() ->
{unix, linux} -> {unix, linux} ->
"linux_x86_64"; "linux_x86_64";
{unix, darwin} -> {unix, darwin} ->
case erlang:system_info(system_architecture) of case string:trim(os:cmd("uname -m")) of
"aarch64-" ++ _ -> "arm64" ->
"mac_arm64"; "mac_arm64";
"x86_64" ->
"mac_x86_64";
Other -> Other ->
ok = log(info, "system_architecture: ~p", [Other]), ok = log(info, "uname -m: ~p", [Other]),
"mac_x86_64" "mac_x86_64"
end; end;
{win32, nt} -> {win32, nt} ->