Parcourir la source

simplicy the check for infinite loop

pull/101/head
Yamashita Yuu il y a 10 ans
Parent
révision
71a916faf2
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. +3
    -3
      libexec/pyenv-version-file

+ 3
- 3
libexec/pyenv-version-file Voir le fichier

@ -4,8 +4,8 @@ set -e
[ -n "$PYENV_DEBUG" ] && set -x
find_local_version_file() {
local prev root="$1"
while [ -n "$root" ] && [ "$root" != "$prev" ]; do
local root="$1"
while [ -n "$root" ]; do
if [ -e "${root}/.python-version" ]; then
echo "${root}/.python-version"
exit
@ -13,7 +13,7 @@ find_local_version_file() {
echo "${root}/.pyenv-version"
exit
fi
prev="${root}"
[ "${root}" = "${root%/*}" ] && break
root="${root%/*}"
done
}

Chargement…
Annuler
Enregistrer