mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-06-20 11:47:43 +02:00
test: Fix fish being incorrectly detected as installed
This commit is contained in:
parent
e1a0c7a349
commit
eee3156e8a
@ -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:"
|
||||
|
@ -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."
|
||||
|
Loading…
x
Reference in New Issue
Block a user