Parcourir la source

Account for path entries with spaces in remove_from_path

pull/360/head^2
Sam Stephenson il y a 14 ans
Parent
révision
5d0a6630b9
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. +4
    -1
      libexec/rbenv-which

+ 4
- 1
libexec/rbenv-which Voir le fichier

@ -27,7 +27,10 @@ remove_from_path() {
return
fi
for path in ${PATH//:/$'\n'}; do
local paths
IFS=: paths=($PATH)
for path in "${paths[@]}"; do
path="$(expand_path "$path" || true)"
if [ -n "$path" ] && [ "$path" != "$path_to_remove" ]; then
result="${result}${path}:"

Chargement…
Annuler
Enregistrer