mirror of
https://github.com/rbenv/rbenv.git
synced 2025-01-01 06:37:11 +01:00
rbenv-which: change PATH only for the "command -v" lookup
This is not really necessary, because rbenv-which is used in a subshell currently, but makes a difference if rbenv-which would be sourced.
This commit is contained in:
parent
199e598351
commit
8103febc62
1 changed files with 2 additions and 2 deletions
|
@ -37,8 +37,8 @@ fi
|
||||||
RBENV_VERSION="${RBENV_VERSION:-$(rbenv-version-name)}"
|
RBENV_VERSION="${RBENV_VERSION:-$(rbenv-version-name)}"
|
||||||
|
|
||||||
if [ "$RBENV_VERSION" = "system" ]; then
|
if [ "$RBENV_VERSION" = "system" ]; then
|
||||||
PATH="$(remove_from_path "${RBENV_ROOT}/shims")"
|
PATH="$(remove_from_path "${RBENV_ROOT}/shims")" \
|
||||||
RBENV_COMMAND_PATH="$(command -v "$RBENV_COMMAND" || true)"
|
RBENV_COMMAND_PATH="$(command -v "$RBENV_COMMAND" || true)"
|
||||||
else
|
else
|
||||||
RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
|
RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue