rbenv-version-name returns system for empty version files. Closes #62, #65, #77.

This commit is contained in:
Sam Stephenson 2011-09-09 15:52:31 -05:00
parent 579a398e4e
commit db2a94d4bc
2 changed files with 4 additions and 4 deletions

View file

@ -13,6 +13,6 @@ if [ -e "$VERSION_FILE" ]; then
break
fi
done < <( cat "$VERSION_FILE" && echo )
else
exit 1
fi
exit 1

View file

@ -6,8 +6,8 @@ if [ -z "$RBENV_VERSION" ]; then
RBENV_VERSION="$(rbenv-version-file-read "$RBENV_VERSION_FILE" || true)"
fi
if [ "$RBENV_VERSION" = "system" ]; then
echo "$RBENV_VERSION"
if [ -z "$RBENV_VERSION" ] || [ "$RBENV_VERSION" = "system" ]; then
echo "system"
exit
fi