[Fix] nvm_get_arch: only apply musl suffix on x64 Alpine

Alpine detection unconditionally set `x64-musl` regardless of actual architecture, which would be incorrect on ARM-based Alpine containers.

Bug introduced in ef7fc2f2c0 / #3212.
Fixes #3616.
This commit is contained in:
Jordan Harband
2026-03-14 12:53:14 -07:00
parent a5de7236d6
commit 39e71eab49
4 changed files with 62 additions and 1 deletions

5
test/mocks/uname_linux_aarch64 Executable file
View File

@@ -0,0 +1,5 @@
if [ "_$1" = "_-m" ]; then
echo "aarch64"
else
echo "Linux hostname 5.15.0-1 #1 SMP aarch64 aarch64 aarch64 GNU/Linux"
fi

5
test/mocks/uname_linux_x86_64 Executable file
View File

@@ -0,0 +1,5 @@
if [ "_$1" = "_-m" ]; then
echo "x86_64"
else
echo "Linux hostname 5.15.0-1 #1 SMP x86_64 x86_64 x86_64 GNU/Linux"
fi