浏览代码

Deal with an empty result from expand_path

pull/360/head^2
Eric Lindvall 15 年前
父节点
当前提交
b81b64453b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      libexec/rbenv-which

+ 5
- 0
libexec/rbenv-which 查看文件

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

正在加载...
取消
保存