[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}")"
|
VERSION="$(nvm_version "${PROVIDED_VERSION}")"
|
||||||
fi
|
fi
|
||||||
unset NVM_RC_VERSION
|
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
|
else
|
||||||
VERSION="$(nvm_match_version "${PROVIDED_VERSION}")"
|
VERSION="$(nvm_match_version "${PROVIDED_VERSION}")"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue