Fix nvm on SmartOS setups using 64 bits pkgsrc repository

On SmartOS setups using 64 bits pkgsrc repositories, `nvm_get_arch`
would not handle pkg_info's output properly.

This would result in nvm not being to install any node binary when
running on SmartOS setups using a 64 bits pkgsrc repository.

This change fixes this problem, and fixes the tests suite on similar
setups.
This commit is contained in:
Julien Gilli
2016-07-29 13:51:06 -07:00
parent f51b1bf8ae
commit a32b914bab
4 changed files with 8 additions and 0 deletions

2
nvm.sh
View File

@@ -1235,6 +1235,8 @@ nvm_get_arch() {
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
HOST_ARCH=$(isainfo -n)
else
HOST_ARCH=$(echo "$HOST_ARCH" | tail -1)
fi
else
HOST_ARCH="$(command uname -m)"