mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-07-18 12:58:21 +08:00
[Fix] install: use darwin-x64 for all binary on mac for node < v16
This commit is contained in:
@@ -2438,15 +2438,10 @@ nvm_get_download_slug() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# If running MAC M1 :: Node v14.17.0 was the first version to offer official experimental support:
|
||||
# https://github.com/nodejs/node/issues/40126 (although binary distributions aren't available until v16)
|
||||
if \
|
||||
nvm_version_greater '14.17.0' "${VERSION}" \
|
||||
|| (nvm_version_greater_than_or_equal_to "${VERSION}" '15.0.0' && nvm_version_greater '16.0.0' "${VERSION}") \
|
||||
; then
|
||||
if [ "_${NVM_OS}" = '_darwin' ] && [ "${NVM_ARCH}" = 'arm64' ]; then
|
||||
NVM_ARCH=x64
|
||||
fi
|
||||
# If running MAC M1 :: ARM64 binaries are not available for Node < 16.0.0
|
||||
# https://github.com/nodejs/node/issues/40126 (binary distributions aren't available until v16)
|
||||
if nvm_version_greater '16.0.0' "${VERSION}" && [ "_${NVM_OS}" = '_darwin' ] && [ "${NVM_ARCH}" = 'arm64' ]; then
|
||||
NVM_ARCH=x64
|
||||
fi
|
||||
|
||||
if [ "${KIND}" = 'binary' ]; then
|
||||
|
||||
Reference in New Issue
Block a user