mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-10 20:43:48 -05:00
Extract rbenv-version-file{,-read,-write}
This commit is contained in:
15
libexec/rbenv-version-file
Executable file
15
libexec/rbenv-version-file
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user