From 08df7f45c8fd4046ba9efdf1afee7e7f739ada1d Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 27 Feb 2024 23:04:10 +0000 Subject: [PATCH] pkg/cli/test_exp.sh: use command -v `which` is non-portable and not part of POSIX, but we can use `command -v` for the same effect. Debian [0] and Gentoo [1] are both trying to drop which from their base system. [0] https://lwn.net/Articles/874049/ [1] https://bugs.gentoo.org/646588 Signed-off-by: Sam James --- pkg/cli/test_exp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cli/test_exp.sh b/pkg/cli/test_exp.sh index 6986e17ed2..b855453992 100755 --- a/pkg/cli/test_exp.sh +++ b/pkg/cli/test_exp.sh @@ -4,7 +4,7 @@ set -eu FQ="$1" shift -if which expect >/dev/null 2>&1; then +if command -v expect >/dev/null 2>&1; then TEMPDIR=$(mktemp -d) cp "$FQ" "${TEMPDIR}/fq" PATH="${TEMPDIR}:${PATH}" expect "$1" >"${TEMPDIR}/fq.log" && FAIL=0 || FAIL=1