mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-14 22:33:52 -05:00
Ignore shell builtins and functions when looking up commands in PATH
Weirdly, `command -v true` returns `true` instead of `/usr/bin/true`.
This commit is contained in:
@@ -38,7 +38,7 @@ remove_prototype_shim() {
|
||||
# absolute path to the rbenv executable itself.
|
||||
rbenv_path() {
|
||||
local found
|
||||
found="$(PATH="$RBENV_ORIG_PATH" command -v rbenv)"
|
||||
found="$(PATH="$RBENV_ORIG_PATH" type -P rbenv)"
|
||||
if [[ $found == /* ]]; then
|
||||
echo "$found"
|
||||
elif [[ -n "$found" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user