Nicer failure message when trying to install an invalid version. Fixes #285.
parent
5aa78f21cf
commit
f00d688c87
5
nvm.sh
5
nvm.sh
|
@ -308,6 +308,11 @@ nvm() {
|
|||
|
||||
[ -d "$NVM_DIR/$VERSION" ] && echo "$VERSION is already installed." && return
|
||||
|
||||
if [ "$VERSION" = "N/A" ]; then
|
||||
echo "Version '$VERSION' not found - try \`nvm ls-remote\` to browse available versions."
|
||||
return 3
|
||||
fi
|
||||
|
||||
# skip binary install if no binary option specified.
|
||||
if [ $nobinary -ne 1 ]; then
|
||||
# shortcut - try the binary if possible.
|
||||
|
|
Loading…
Reference in New Issue