From 8103febc62d7b45de21bdde8940692d01e70987d Mon Sep 17 00:00:00 2001
From: Daniel Hahler <git@thequod.de>
Date: Thu, 7 Jun 2018 23:36:28 +0200
Subject: [PATCH] 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.
---
 libexec/rbenv-which | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libexec/rbenv-which b/libexec/rbenv-which
index 78db1c05..b354b1e4 100755
--- a/libexec/rbenv-which
+++ b/libexec/rbenv-which
@@ -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