mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
[Fix] nvm use
: improve help output with bare nvm use
and no .nvmrc
Closes #1914.
This commit is contained in:
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
Block a user