Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,7 @@ nvm_get_arch() {
x86_64 | amd64) NVM_ARCH="x64" ;;
i*86) NVM_ARCH="x86" ;;
aarch64 | armv8l) NVM_ARCH="arm64" ;;
loongarch64) NVM_ARCH="loong64" ;;
*) NVM_ARCH="${HOST_ARCH}" ;;
esac

Expand Down
2 changes: 2 additions & 0 deletions test/fast/Unit tests/nvm_get_arch
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@ run_test amd64 osx x64
run_test arm64 smartos x64
run_test armv8l smartos x64

run_test loongarch64 linux loong64

cleanup
5 changes: 5 additions & 0 deletions test/mocks/uname_linux_loongarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if [ "_$1" = "_-m" ]; then
echo "loongarch64"
else
echo "Linux foo 6.12.54-16k #0 SMP PREEMPT_DYNAMIC Fri Dec 5 12:35:43 UTC loongarch64 GNU/Linux"
fi
Loading