mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-07-18 12:58:21 +08:00
[Fix] support arm64-musl on Alpine Linux
Node.js unofficial-builds publishes linux-arm64-musl binaries since v20.20.1 / v22.21.1 / v24+. Map NVM_ARCH=arm64 to arm64-musl on Alpine so `nvm install` resolves to the correct tarball instead of the glibc-linked arm64 build that won't run against musl. [Tests] `nvm_get_arch`: expect arm64-musl on Alpine Co-authored-by: Jesse Zhu <jesse@itjesse.com> Co-authored-by: Jordan Harband <ljharb@gmail.com>
This commit is contained in:
co-authored by
Jordan Harband
parent
c7d5d7748b
commit
ce157c1171
@@ -2252,9 +2252,11 @@ nvm_get_arch() {
|
||||
fi
|
||||
|
||||
if [ -f "/etc/alpine-release" ]; then
|
||||
# Alpine Linux uses musl libc; only x64-musl binaries are available
|
||||
# Alpine Linux uses musl libc; map to musl variants where available
|
||||
# See https://unofficial-builds.nodejs.org/download/release/
|
||||
case "${NVM_ARCH}" in
|
||||
x64) NVM_ARCH=x64-musl ;;
|
||||
arm64) NVM_ARCH=arm64-musl ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user