mirror of
https://github.com/rbenv/rbenv.git
synced 2024-12-29 13:15:42 +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
|
||||
|
||||
export RBENV_VERSION
|
||||
RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")"
|
||||
RBENV_BIN_PATH="${RBENV_COMMAND_PATH%/*}"
|
||||
if [ "$1" = "--no-resolve" ]; then
|
||||
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"
|
||||
IFS=$'\n' scripts=(`rbenv-hooks exec`)
|
||||
|
|
Loading…
Reference in a new issue