mirror of
https://github.com/rbenv/rbenv.git
synced 2025-01-01 14:45:03 +01:00
exec --no-resolve parameter introduced
Allows to execute arbitrary command in the context of selected ruby. #865
This commit is contained in:
parent
c8ba27fd07
commit
14463696b7
1 changed files with 10 additions and 2 deletions
|
@ -30,8 +30,16 @@ if [ -z "$RBENV_COMMAND" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export RBENV_VERSION
|
export RBENV_VERSION
|
||||||
RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")"
|
if [ "$1" = "--no-resolve" ]; then
|
||||||
RBENV_BIN_PATH="${RBENV_COMMAND_PATH%/*}"
|
RBENV_COMMAND="$2"
|
||||||
|
RBENV_COMMAND_PATH="$RBENV_COMMAND"
|
||||||
|
RBENV_BIN_PATH="$(rbenv-prefix)/bin"
|
||||||
|
shift 1
|
||||||
|
else
|
||||||
|
RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")"
|
||||||
|
RBENV_BIN_PATH="${RBENV_COMMAND_PATH%/*}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
OLDIFS="$IFS"
|
OLDIFS="$IFS"
|
||||||
IFS=$'\n' scripts=(`rbenv-hooks exec`)
|
IFS=$'\n' scripts=(`rbenv-hooks exec`)
|
||||||
|
|
Loading…
Reference in a new issue