From 5410ae57ba0baa1859e078ac876e6b6104c2d39b Mon Sep 17 00:00:00 2001 From: Deniz Date: Sat, 29 Apr 2023 16:41:31 -0700 Subject: [PATCH] [Fix] fix node download link for armv8l Fixes #3035 --- nvm.sh | 2 +- test/fast/Unit tests/nvm_get_arch | 1 + test/mocks/uname_linux_armv8l | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 test/mocks/uname_linux_armv8l diff --git a/nvm.sh b/nvm.sh index a0c451f..d869406 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1913,7 +1913,7 @@ nvm_get_arch() { case "${HOST_ARCH}" in x86_64 | amd64) NVM_ARCH="x64" ;; i*86) NVM_ARCH="x86" ;; - aarch64) NVM_ARCH="arm64" ;; + aarch64 | armv8l) NVM_ARCH="arm64" ;; *) NVM_ARCH="${HOST_ARCH}" ;; esac diff --git a/test/fast/Unit tests/nvm_get_arch b/test/fast/Unit tests/nvm_get_arch index aaf3e83..537a739 100755 --- a/test/fast/Unit tests/nvm_get_arch +++ b/test/fast/Unit tests/nvm_get_arch @@ -80,5 +80,6 @@ run_test x86 osx x86 run_test amd64 osx x64 run_test arm64 smartos x64 +run_test armv8l smartos x64 cleanup diff --git a/test/mocks/uname_linux_armv8l b/test/mocks/uname_linux_armv8l new file mode 100755 index 0000000..3bd5284 --- /dev/null +++ b/test/mocks/uname_linux_armv8l @@ -0,0 +1,5 @@ +if [ "_$1" = "_-m" ]; then + echo "armv8l" +else + echo "Linux 3.18.14-14721103 #1 SMP PREEMPT Thu Mar 5 20:35:37 KST 2020 armv8l armv8l armv8l GNU/Linux" +fi