pyenv/libexec
Mislav Marohnić 76e64ff2ea Have shims survive symlinked rbenv updates a la Homebrew
Homebrew places the rbenv executable in a location such as
`/usr/local/bin/rbenv`, which is in PATH. However, that is a symlink to
`/usr/local/Cellar/rbenv/<VERSION>/bin/rbenv`, which is itself a symlink to
`/usr/local/Cellar/rbenv/<VERSION>/libexec/rbenv`. Upon executing, rbenv
will add its own directory to PATH so that it can easily invoke its
subcommands.

When generating shims during `rbenv rehash`, rbenv will try to put the
absolute path to itself inside each shim so that shims would work even
if rbenv itself isn't in PATH. Under Homebrew, rbenv's directory will be
the versioned directory in Homebrew's Cellar. However, due to Homebrew's
auto-cleanup functionality, shims generated this way will be broken
after upgrading rbenv because of the versioned Cellar path.

This changes how rbenv discovers itself in PATH: it will look at the
original PATH, not in the one modified by rbenv, with the intention of
excluding results under rbenv's own `libexec/`. If rbenv wasn't found in
PATH, return the absolute path to rbenv's own `bin/rbenv`.
2021-09-29 19:54:36 +02:00
..
rbenv Have shims survive symlinked rbenv updates a la Homebrew 2021-09-29 19:54:36 +02:00
rbenv---version rbenv 1.1.2 2019-03-25 15:00:39 +01:00
rbenv-commands Fix some issues reported by shellcheck 2017-11-29 16:20:51 +01:00
rbenv-completions completions for rbenv-completions 2015-11-20 09:12:53 -05:00
rbenv-exec
rbenv-global Remove support for legacy global version files 2015-12-28 22:05:00 -05:00
rbenv-help Supply head -n flag explicitly 2021-05-05 22:42:56 +02:00
rbenv-hooks Supply head -n flag explicitly 2021-05-05 22:42:56 +02:00
rbenv-init Have rbenv init print instructions that hardcode the detected shell 2021-05-06 00:43:16 +02:00
rbenv-local Remove support for legacy version file 2015-12-28 21:34:07 -05:00
rbenv-prefix rbenv-prefix: do not silence rbenv-which for system version 2018-08-07 01:44:13 +02:00
rbenv-rehash Have shims survive symlinked rbenv updates a la Homebrew 2021-09-29 19:54:36 +02:00
rbenv-root Fix some issues reported by shellcheck 2017-11-29 16:20:51 +01:00
rbenv-sh-rehash
rbenv-sh-shell Make work in set -u (nounset) mode 2020-05-24 09:08:05 +03:00
rbenv-shims
rbenv-version libexec/rbenv-version{,-origin}: move "missing rbenv-version-file detection" logic as per @mislav 2020-01-16 23:15:09 +08:00
rbenv-version-file Fix https://github.com/rbenv/rbenv/issues/1065 2018-02-26 16:49:37 +08:00
rbenv-version-file-read Disallow path segments and directory traversal in .ruby-version files 2019-04-03 12:58:25 +02:00
rbenv-version-file-write
rbenv-version-name Merge remote-tracking branch 'origin/master' into version-hooks 2015-12-23 17:22:43 +01:00
rbenv-version-origin libexec/rbenv-version{,-origin}: move "missing rbenv-version-file detection" logic as per @mislav 2020-01-16 23:15:09 +08:00
rbenv-versions Supply head -n flag explicitly 2021-05-05 22:42:56 +02:00
rbenv-whence Fix some issues reported by shellcheck 2017-11-29 16:20:51 +01:00
rbenv-which rbenv-which: change PATH only for the "command -v" lookup 2018-06-07 23:38:12 +02:00