mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-16 15:23:53 -05:00
Account for path entries with spaces in remove_from_path
This commit is contained in:
@@ -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}:"
|
||||||
|
|||||||
Reference in New Issue
Block a user