1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-09 12:03:49 -05:00

Merge pull request #1036 from zachriggle/pwd-changes

Fix $PWD changes when executing Python
This commit is contained in:
Yamashita, Yuu
2017-11-21 10:51:41 +09:00
committed by GitHub
4 changed files with 18 additions and 13 deletions

View File

@@ -60,9 +60,10 @@ resolve_link() {
}
abs_dirname() {
local cwd="$(pwd)"
local path="$1"
# Use a subshell to avoid modifying the current path
(
while [ -n "$path" ]; do
cd "${path%/*}"
local name="${path##*/}"
@@ -70,7 +71,7 @@ abs_dirname() {
done
pwd
cd "$cwd"
)
}
capitalize() {