mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Account for path entries with spaces in remove_from_path
This commit is contained in:
parent
114b81c9a4
commit
5d0a6630b9
1 changed files with 4 additions and 1 deletions
|
@ -27,7 +27,10 @@ remove_from_path() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for path in ${PATH//:/$'\n'}; do
|
local paths
|
||||||
|
IFS=: paths=($PATH)
|
||||||
|
|
||||||
|
for path in "${paths[@]}"; do
|
||||||
path="$(expand_path "$path" || true)"
|
path="$(expand_path "$path" || true)"
|
||||||
if [ -n "$path" ] && [ "$path" != "$path_to_remove" ]; then
|
if [ -n "$path" ] && [ "$path" != "$path_to_remove" ]; then
|
||||||
result="${result}${path}:"
|
result="${result}${path}:"
|
||||||
|
|
Loading…
Reference in a new issue