diff --git a/libexec/rbenv-local b/libexec/rbenv-local index 010e93b3..8b08a429 100755 --- a/libexec/rbenv-local +++ b/libexec/rbenv-local @@ -4,7 +4,9 @@ set -e RBENV_VERSION="$1" RBENV_VERSION_FILE=".rbenv-version" -if [ -n "$RBENV_VERSION" ]; then +if [ "$RBENV_VERSION" = "--unset" ]; then + rm -f "$RBENV_VERSION_FILE" +elif [ -n "$RBENV_VERSION" ]; then rbenv-version-file-write "$RBENV_VERSION_FILE" "$RBENV_VERSION" else rbenv-version-file-read "$RBENV_VERSION_FILE" ||