mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Use $BASH_SOURCE
instead of $0
BASH_SOURCE might be more reliable.
This commit is contained in:
parent
bb129a782b
commit
6e02b944f7
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ if [ -n "$RBENV_DEBUG" ]; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
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() {
|
abs_dirname() {
|
||||||
local path="$(realpath "$1")"
|
local path="$(realpath "$1")"
|
||||||
echo "${path%/*}"
|
echo "${path%/*}"
|
||||||
|
|
Loading…
Reference in a new issue