mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Prepend $PATH with the command's dirname before execing for compatibility with ruby -S
This commit is contained in:
parent
2fa7432060
commit
2a495dc9ac
1 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ if [ -z "$RBENV_COMMAND" ]; then
|
|||
fi
|
||||
|
||||
RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")"
|
||||
RBENV_BIN_PATH="${RBENV_COMMAND_PATH%/*}"
|
||||
|
||||
shopt -s nullglob
|
||||
RBENV_EXEC_PLUGINS=(/etc/rbenv.d/exec/*.bash ${HOME}/.rbenv/rbenv.d/exec/*.bash)
|
||||
|
@ -17,4 +18,5 @@ for script in ${RBENV_EXEC_PLUGINS[@]}; do
|
|||
done
|
||||
|
||||
shift 1
|
||||
export PATH="${RBENV_BIN_PATH}:${PATH}"
|
||||
exec -a "$RBENV_COMMAND" "$RBENV_COMMAND_PATH" "$@"
|
||||
|
|
Loading…
Reference in a new issue