From d97713d1b53f0674bb00d2cea4c1ffedf1747de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 7 Oct 2022 16:38:28 +0200 Subject: [PATCH] Avoid assuming rbenv original project layout Someone packaging rbenv might choose to place the `bin` and `libexec` directories separately. --- libexec/rbenv-rehash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libexec/rbenv-rehash b/libexec/rbenv-rehash index 47a5d293..00b0e744 100755 --- a/libexec/rbenv-rehash +++ b/libexec/rbenv-rehash @@ -45,8 +45,7 @@ rbenv_path() { echo "$PWD/${found#./}" else # Assume rbenv isn't in PATH. - local here="${BASH_SOURCE%/*}" - echo "${here%/*}/bin/rbenv" + echo "${BASH_SOURCE%/*}/rbenv" fi }