mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-07 20:31:01 -05:00
Deal with an empty result from expand_path
This commit is contained in:
parent
aade3ad781
commit
b81b64453b
1 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,11 @@ remove_from_path() {
|
|||
local path_to_remove="$(expand_path "$1")"
|
||||
local result=""
|
||||
|
||||
if [ -z "$path_to_remove" ]; then
|
||||
echo "${PATH}"
|
||||
return
|
||||
fi
|
||||
|
||||
for path in ${PATH//:/$'\n'}; do
|
||||
path="$(expand_path "$path" || true)"
|
||||
if [ -n "$path" ] && [ "$path" != "$path_to_remove" ]; then
|
||||
|
|
Loading…
Reference in a new issue