From 68fca03bb8b497b141094c097c2f0203377f9650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 11 Nov 2021 18:46:44 +0200 Subject: [PATCH] Use test -aP instead of which -a in test helper The former is a bash builtin, latter not necessarily available. For example, `which` is deprecated in Debian's debianutils >= 5.0. --- test/test_helper.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_helper.bash b/test/test_helper.bash index 6e40d6cb..d52ad0e0 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -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 '/' '-')"