1
0
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:
Mislav Marohnić
2022-10-07 16:34:38 +02:00
parent 6b1cc34610
commit 43e30ef815
5 changed files with 5 additions and 5 deletions

View File

@@ -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