From eee3156e8a48bdfc7d4c81d802764bb458779fdc Mon Sep 17 00:00:00 2001 From: Ethan P Date: Wed, 7 Apr 2021 20:38:35 -0700 Subject: [PATCH] test: Fix fish being incorrectly detected as installed --- test/shimexec/fish | 2 +- test/suite/batpipe.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/shimexec/fish b/test/shimexec/fish index c7d2331..cd5574c 100755 --- a/test/shimexec/fish +++ b/test/shimexec/fish @@ -4,7 +4,7 @@ HERE="$(cd "$(dirname "$0")" && pwd)" while read -d ':' -r dir; do if [[ "$dir" == "$HERE" || -z "$dir" ]]; then continue; fi if [[ -f "${dir}/fish" ]]; then - TMPDIR= "${dir}/fish" "$@" + TMPDIR='' "${dir}/fish" "$@" exit $? fi done <<<"$PATH:" diff --git a/test/suite/batpipe.sh b/test/suite/batpipe.sh index f16509f..c4b7164 100644 --- a/test/suite/batpipe.sh +++ b/test/suite/batpipe.sh @@ -13,6 +13,7 @@ test:detected_bash_shell() { test:detected_fish_shell() { description "Test it can detect a bash shell." command -v "fish" &>/dev/null || skip "Test requires fish shell." + fish -c 'exit 0' &>/dev/null || skip "Test requires fish shell." # This is in case it finds "fish" in shimexec dir. output="$(SHELL="fish" fish --login -c "$(batpipe_path)")" grep '^set -x' <<< "$output" >/dev/null || fail "Detected the wrong shell for fish."