mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Fix discovering .ruby-version
files in root directory
It's not that this is a preferred way to set a global version (one should use `rbenv global <version>` instead), but this fixes the function purely for correctness: all parent directories should be scanned, even the root directory. Fixes #745
This commit is contained in:
parent
5b9e4f0584
commit
43b28caa94
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,7 @@ set -e
|
|||
|
||||
find_local_version_file() {
|
||||
local root="$1"
|
||||
while [ -n "$root" ]; do
|
||||
while true; do
|
||||
if [ -e "${root}/.ruby-version" ]; then
|
||||
echo "${root}/.ruby-version"
|
||||
exit
|
||||
|
@ -13,6 +13,7 @@ find_local_version_file() {
|
|||
echo "${root}/.rbenv-version"
|
||||
exit
|
||||
fi
|
||||
[ -n "$root" ] || break
|
||||
root="${root%/*}"
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue