pyenv/libexec/rbenv-version-file
2011-08-18 14:11:40 -05:00

15 lines
244 B
Bash
Executable file

#!/usr/bin/env bash
set -e
DEFAULT_PATH="${HOME}/.rbenv/default"
root="$(pwd)"
while [ -n "$root" ]; do
if [ -e "${root}/.rbenv-version" ]; then
echo "${root}/.rbenv-version"
exit
fi
root="${root%/*}"
done
echo "$DEFAULT_PATH"