Return a nonzero exit code from nvm_rc_version when no .nvmrc found

master
Jordan Harband 2014-09-15 07:51:00 -07:00
parent 64de890d07
commit 152904e3fb
1 changed files with 3 additions and 0 deletions

3
nvm.sh
View File

@ -98,6 +98,9 @@ nvm_rc_version() {
if [ -e "$NVMRC_PATH" ]; then
read NVM_RC_VERSION < "$NVMRC_PATH"
echo "Found '$NVMRC_PATH' with version <$NVM_RC_VERSION>"
else
>&2 echo "No .nvmrc file found"
return 1
fi
}