From 022af184f16f2bf1a2444a02f351143ca3bb2177 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 14 Feb 2021 07:55:02 -0500 Subject: [PATCH] add check for bash shell --- err | 2 ++ 1 file changed, 2 insertions(+) diff --git a/err b/err index 2755e24..a5d3752 100644 --- a/err +++ b/err @@ -36,6 +36,8 @@ # outside of the subshell. Note, errexit + inherit_errexit doesn't have # any smarts around this either. +if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi + ####################################### # err-catch: Setup trap on ERR to print stack trace and exit (or return # if the shell is interactive). This is the most common use case so we -- 2.25.1