Quellcode durchsuchen

Deal with an empty result from expand_path

pull/360/head^2
Eric Lindvall vor 15 Jahren
Ursprung
Commit
b81b64453b
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. +5
    -0
      libexec/rbenv-which

+ 5
- 0
libexec/rbenv-which Datei anzeigen

@ -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

Laden…
Abbrechen
Speichern