diff --git a/libexec/rbenv-version-file-read b/libexec/rbenv-version-file-read index a7b02c0..74f7acb 100755 --- a/libexec/rbenv-version-file-read +++ b/libexec/rbenv-version-file-read @@ -13,6 +13,6 @@ if [ -e "$VERSION_FILE" ]; then break fi done < <( cat "$VERSION_FILE" && echo ) -else - exit 1 fi + +exit 1 diff --git a/libexec/rbenv-version-name b/libexec/rbenv-version-name index 4782de7..195d134 100755 --- a/libexec/rbenv-version-name +++ b/libexec/rbenv-version-name @@ -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