1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-11 13:03:46 -05:00

Import changes from ruby-build 20140110.1

This commit is contained in:
Yamashita Yuu
2014-01-10 20:05:01 +09:00
parent 461c5bbc2d
commit 07ae0d8e42
3 changed files with 36 additions and 22 deletions

View File

@@ -99,7 +99,7 @@ unset VERSION_NAME
# version is specified by pyenv. Show usage instructions if a local
# version is not specified.
DEFINITION="${ARGUMENTS[0]}"
[ -n "$DEFINITION" ] || DEFINITION="$(pyenv local 2>/dev/null || true)"
[ -n "$DEFINITION" ] || DEFINITION="$(pyenv-local 2>/dev/null || true)"
[ -n "$DEFINITION" ] || usage 1
@@ -118,10 +118,10 @@ after_install() {
after_hooks["${#after_hooks[@]}"]="$hook"
}
# Load plugin hooks.
for script in $(pyenv-hooks install); do
source "$script"
done
OLDIFS="$IFS"
IFS=$'\n' scripts=(`pyenv-hooks install`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do source "$script"; done
# Set VERSION_NAME from $DEFINITION, if it is not already set. Then
@@ -201,7 +201,7 @@ for hook in "${after_hooks[@]}"; do eval "$hook"; done
# Run `pyenv-rehash` after a successful installation.
if [ "$STATUS" == "0" ]; then
pyenv rehash
pyenv-rehash
else
cleanup
fi