Moving the N/A check earlier in `nvm install`

master
Jordan Harband 2015-01-21 16:19:22 -08:00
parent 6cac732141
commit 17df0b9912
1 changed files with 5 additions and 5 deletions

10
nvm.sh
View File

@ -963,6 +963,11 @@ nvm() {
;;
esac
if [ "_$VERSION" = "_N/A" ]; then
echo "Version '$provided_version' not found - try \`nvm ls-remote\` to browse available versions." >&2
return 3
fi
ADDITIONAL_PARAMETERS=''
local PROVIDED_REINSTALL_PACKAGES_FROM
local REINSTALL_PACKAGES_FROM
@ -1004,11 +1009,6 @@ nvm() {
return $?
fi
if [ "_$VERSION" = "_N/A" ]; then
echo "Version '$provided_version' not found - try \`nvm ls-remote\` to browse available versions." >&2
return 3
fi
if [ "_$NVM_OS" = "_freebsd" ]; then
# node.js and io.js do not have a FreeBSD binary
nobinary=1