[new] better error message for nvm install lts

This commit is contained in:
Myles Borins 2018-08-16 01:14:38 -04:00
parent e7a37f336d
commit b8258f72b1
No known key found for this signature in database
GPG Key ID: 933B01F40B5CA946

6
nvm.sh
View File

@ -2641,7 +2641,11 @@ nvm() {
else
REMOTE_CMD='nvm ls-remote'
fi
nvm_err "Version '$provided_version' ${LTS_MSG-}not found - try \`${REMOTE_CMD}\` to browse available versions."
if [ "${provided_version}" = 'lts' ]; then
nvm_err "To install the latest LTS version of Node.js use the command \`nvm install --lts\`."
else
nvm_err "Version '$provided_version' ${LTS_MSG-}not found - try \`${REMOTE_CMD}\` to browse available versions."
fi
return 3
fi