소스 검색

Fall back to $PWD if a local version file can't be found in $RBENV_DIR

pull/360/head^2
Sam Stephenson 13 년 전
부모
커밋
6c1fb9ffd0
1개의 변경된 파일13개의 추가작업 그리고 8개의 파일을 삭제
  1. +13
    -8
      libexec/rbenv-version-file

+ 13
- 8
libexec/rbenv-version-file 파일 보기

@ -2,14 +2,19 @@
set -e
[ -n "$RBENV_DEBUG" ] && set -x
root="$RBENV_DIR"
while [ -n "$root" ]; do
if [ -e "${root}/.rbenv-version" ]; then
echo "${root}/.rbenv-version"
exit
fi
root="${root%/*}"
done
find_local_version_file() {
local root="$1"
while [ -n "$root" ]; do
if [ -e "${root}/.rbenv-version" ]; then
echo "${root}/.rbenv-version"
exit
fi
root="${root%/*}"
done
}
find_local_version_file "$RBENV_DIR"
[ "$RBENV_DIR" = "$PWD" ] || find_local_version_file "$PWD"
global_version_file="${RBENV_ROOT}/version"

불러오는 중...
취소
저장