[Fix] nvm_rc_version: clarify error when no version and no .nvmrc

Previously the message read "No .nvmrc file found",
which obscured the fact that the user also did not pass a version.
The new wording names both halves of the actual problem.

Refs #3755
This commit is contained in:
Jordan Harband
2026-05-05 16:20:22 -07:00
parent a9933f77a6
commit ed4dbdfdd5
2 changed files with 40 additions and 1 deletions

2
nvm.sh
View File

@@ -622,7 +622,7 @@ nvm_rc_version() {
NVMRC_PATH="$(nvm_find_nvmrc)"
if [ ! -e "${NVMRC_PATH}" ]; then
if [ "${NVM_SILENT:-0}" -ne 1 ]; then
nvm_err "No .nvmrc file found"
nvm_err "No version provided and no .nvmrc file found"
fi
return 1
fi