[Fix] do not print help text on sourcing when an empty .nvmrc file is found.
Fixes #1113.
parent
45ae48df2d
commit
36b1ea9236
5
nvm.sh
5
nvm.sh
|
@ -166,7 +166,12 @@ nvm_rc_version() {
|
|||
NVMRC_PATH="$(nvm_find_nvmrc)"
|
||||
if [ -e "$NVMRC_PATH" ]; then
|
||||
read -r NVM_RC_VERSION < "$NVMRC_PATH" || printf ''
|
||||
if [ -n "$NVM_RC_VERSION" ]; then
|
||||
nvm_echo "Found '$NVMRC_PATH' with version <$NVM_RC_VERSION>"
|
||||
else
|
||||
nvm_err "Warning: empty .nvmrc file found at \"$NVMRC_PATH\""
|
||||
return 2
|
||||
fi
|
||||
else
|
||||
nvm_err "No .nvmrc file found"
|
||||
return 1
|
||||
|
|
Loading…
Reference in New Issue