浏览代码

Use `$BASH_SOURCE` instead of `$0`

BASH_SOURCE might be more reliable.
pull/487/head^2
Mislav Marohnić 10 年前
父节点
当前提交
6e02b944f7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      libexec/rbenv

+ 1
- 1
libexec/rbenv 查看文件

@ -12,7 +12,7 @@ if [ -n "$RBENV_DEBUG" ]; then
set -x
fi
if enable -f "${0%/*}"/../libexec/rbenv-realpath.dylib realpath 2>/dev/null; then
if enable -f "${BASH_SOURCE%/*}"/../libexec/rbenv-realpath.dylib realpath 2>/dev/null; then
abs_dirname() {
local path="$(realpath "$1")"
echo "${path%/*}"

正在加载...
取消
保存