commit | 94a72ae217694bfbb290b17f47ae0e063bff7aaa | [log] [tgz] |
---|---|---|
author | Jordan Harband <ljharb@gmail.com> | Tue Oct 08 14:40:17 2019 -0700 |
committer | Jordan Harband <ljharb@gmail.com> | Tue Oct 08 14:40:17 2019 -0700 |
tree | 13bf1c2bb3783e0d6c19a00d6efd52b0b6405fa8 | |
parent | 011810e721c4c26be997c7c0b62739c7b991526d [diff] |
[Fix] `nvm use`: improve help output with bare `nvm use` and no `.nvmrc` Closes #1914.
diff --git a/nvm.sh b/nvm.sh index 84a9dfd..221efc6 100644 --- a/nvm.sh +++ b/nvm.sh
@@ -2909,6 +2909,10 @@ 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