[Fix] `nvm use`: improve help output with bare `nvm use` and no `.nvmrc`
Closes #1914.
parent
011810e721
commit
94a72ae217
4
nvm.sh
4
nvm.sh
|
@ -2909,6 +2909,10 @@ nvm() {
|
|||
VERSION="$(nvm_version "${PROVIDED_VERSION}")"
|
||||
fi
|
||||
unset NVM_RC_VERSION
|
||||
if [ -z "${VERSION}" ]; then
|
||||
nvm_err 'Please see `nvm --help` or https://github.com/nvm-sh/nvm#nvmrc for more information.'
|
||||
return 127
|
||||
fi
|
||||
else
|
||||
VERSION="$(nvm_match_version "${PROVIDED_VERSION}")"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue