Permalink
Browse files

Merge pull request #1093 from blueyed/which

rbenv-which: change PATH only for the "command -v" lookup
  • Loading branch information...
mislav committed Jun 7, 2018
2 parents 8b18b96 + 8103feb commit 1c772d5ff21bbee52e0c6cdf128c5cffaf8feea8
Showing with 2 additions and 2 deletions.
  1. +2 −2 libexec/rbenv-which
View
@@ -37,8 +37,8 @@ fi
RBENV_VERSION="${RBENV_VERSION:-$(rbenv-version-name)}"
if [ "$RBENV_VERSION" = "system" ]; then
PATH="$(remove_from_path "${RBENV_ROOT}/shims")"
RBENV_COMMAND_PATH="$(command -v "$RBENV_COMMAND" || true)"
PATH="$(remove_from_path "${RBENV_ROOT}/shims")" \
RBENV_COMMAND_PATH="$(command -v "$RBENV_COMMAND" || true)"
else
RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
fi

0 comments on commit 1c772d5

Please sign in to comment.