From f9b18f7e8ec2a18791721ef2e49e19ae540352fe Mon Sep 17 00:00:00 2001 From: Ethan P Date: Wed, 6 May 2020 18:56:27 -0700 Subject: [PATCH] test: Fix bat shimexec --- test/shimexec/bat | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/shimexec/bat b/test/shimexec/bat index e86b61d..e21a222 100755 --- a/test/shimexec/bat +++ b/test/shimexec/bat @@ -2,8 +2,12 @@ # Find the real bat. HERE="$(cd "$(dirname "$0")" && pwd)" while read -d ':' -r dir; do - if [[ "$dir" == "$HERE" ]]; then continue; fi + if [[ "$dir" == "$HERE" || -z "$dir" ]]; then continue; fi if [[ -f "${dir}/bat" ]]; then exec "${dir}/bat" "$@" --theme="Monokai Extended" fi -done <<<"$PATH" +done <<<"$PATH:" + +# Print error and exit. +echo "bat was not found on \$PATH" 1>&2 +exit 127