mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-13 22:03:52 -05:00
Merge remote-tracking branch 'rbenv/master'
Using `git merge rbenv/master -s recursive -X rename-threshold=5%`. Conflicts: README.md bin/python-local-exec libexec/pyenv libexec/pyenv-help test/--version.bats
This commit is contained in:
@@ -28,26 +28,26 @@ if enable -f "${BASH_SOURCE%/*}"/../libexec/pyenv-realpath.dylib realpath 2>/dev
|
||||
else
|
||||
[ -z "$PYENV_NATIVE_EXT" ] || abort "failed to load \`realpath' builtin"
|
||||
|
||||
READLINK=$(type -p greadlink readlink | head -1)
|
||||
[ -n "$READLINK" ] || abort "cannot find readlink - are you missing GNU coreutils?"
|
||||
READLINK=$(type -p greadlink readlink | head -1)
|
||||
[ -n "$READLINK" ] || abort "cannot find readlink - are you missing GNU coreutils?"
|
||||
|
||||
resolve_link() {
|
||||
$READLINK "$1"
|
||||
}
|
||||
resolve_link() {
|
||||
$READLINK "$1"
|
||||
}
|
||||
|
||||
abs_dirname() {
|
||||
local cwd="$(pwd)"
|
||||
local path="$1"
|
||||
abs_dirname() {
|
||||
local cwd="$PWD"
|
||||
local path="$1"
|
||||
|
||||
while [ -n "$path" ]; do
|
||||
cd "${path%/*}"
|
||||
local name="${path##*/}"
|
||||
path="$(resolve_link "$name" || true)"
|
||||
done
|
||||
while [ -n "$path" ]; do
|
||||
cd "${path%/*}"
|
||||
local name="${path##*/}"
|
||||
path="$(resolve_link "$name" || true)"
|
||||
done
|
||||
|
||||
pwd
|
||||
cd "$cwd"
|
||||
}
|
||||
pwd
|
||||
cd "$cwd"
|
||||
}
|
||||
fi
|
||||
|
||||
if [ -z "${PYENV_ROOT}" ]; then
|
||||
@@ -71,10 +71,10 @@ if [ -z "${PYENV_DIR}" ]; then
|
||||
fi
|
||||
|
||||
if [ -z "${PYENV_DIR}" ]; then
|
||||
PYENV_DIR="$(pwd)"
|
||||
PYENV_DIR="$PWD"
|
||||
else
|
||||
cd "$PYENV_DIR" 2>/dev/null || abort "cannot change working directory to \`$PYENV_DIR'"
|
||||
PYENV_DIR="$(pwd)"
|
||||
PYENV_DIR="$PWD"
|
||||
cd "$OLDPWD"
|
||||
fi
|
||||
export PYENV_DIR
|
||||
|
||||
@@ -23,7 +23,8 @@ remove_from_path() {
|
||||
path_before="$result"
|
||||
result="${result//:$path_to_remove:/:}"
|
||||
done
|
||||
echo "${result%:}"
|
||||
result="${result%:}"
|
||||
echo "${result#:}"
|
||||
}
|
||||
|
||||
PYENV_COMMAND="$1"
|
||||
|
||||
Reference in New Issue
Block a user