Merge pull request #1359 from scop/which-a-to-type-aP

Use test -aP instead of which -a in test helper
This commit is contained in:
Hiroshi SHIBATA 2021-11-17 21:36:16 +09:00 committed by GitHub
commit 304cb7b6a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,7 @@ path_without() {
local exe="$1"
local path=":${PATH}:"
local found alt util
for found in $(which -a "$exe"); do
for found in $(type -aP "$exe"); do
found="${found%/*}"
if [ "$found" != "${RBENV_ROOT}/shims" ]; then
alt="${RBENV_TEST_DIR}/$(echo "${found#/}" | tr '/' '-')"