Skip to content
Myr

[Fix] do not print help text on sourcing when an empty .nvmrc file is found.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes #1113.

authored by Jordan Harband · committed by Jordan Harband · parent 45ae48d · Browse files · 1 file+6 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−1 removed

  • other:+6 added−1 removed

1 file+6 added−1 removed

modified:nvm.sh+6 added-1 removed
164 unmodified lines
165 local NVMRC_PATH166 NVMRC_PATH="$(nvm_find_nvmrc)"167 if [ -e "$NVMRC_PATH" ]; then168 read -r NVM_RC_VERSION < "$NVMRC_PATH" || printf ''169 if [ -n "$NVM_RC_VERSION" ]; then169 nvm_echo "Found '$NVMRC_PATH' with version <$NVM_RC_VERSION>"170 nvm_echo "Found '$NVMRC_PATH' with version <$NVM_RC_VERSION>"171 else172 nvm_err "Warning: empty .nvmrc file found at \"$NVMRC_PATH\""173 return 2174 fi175 else176 nvm_err "No .nvmrc file found"177 return 1178 fi
2448 unmodified lines