Use `uname -m` instead of `uname -a`.

Fixes #744.
Jordan Harband 2015-04-28 22:56:43 -07:00
parent 0aac462b15
commit a6f5eff0f3
1 changed files with 4 additions and 4 deletions

8
nvm.sh
View File

@ -870,12 +870,12 @@ nvm_get_os() {
nvm_get_arch() {
local NVM_UNAME
NVM_UNAME="$(uname -a)"
NVM_UNAME="$(uname -m)"
local NVM_ARCH
case "$NVM_UNAME" in
*x86_64*) NVM_ARCH=x64 ;;
*i*86*) NVM_ARCH=x86 ;;
*) NVM_ARCH="$(uname -m)" ;;
x86_64) NVM_ARCH="x64" ;;
i*86) NVM_ARCH="x86" ;;
*) NVM_ARCH="$NVM_UNAME" ;;
esac
echo "$NVM_ARCH"
}