Re: [PATCH v4 12/12] t: detect errors outside of test cases
- From
Jeff King <peff@peff.net>
- Date
- Apr 18, 2026, 17:44 UTC
- Message-ID
- <20260418174446.GA1695@coredump.intra.peff.net>
- In-Reply-To
- <AA6F33AD-25C2-4AB0-A624-35C7B0BE0F66@gmail.com>
On Sat, Apr 18, 2026 at 08:17:10AM -0400, Ben Knoble wrote:
Show 6 quoted lines
> > +if test "$GIT_TEST_USE_SET_E" = 1 && test "${BASH_VERSINFO:=0}" -ge 5
> > then
> > set -e
> > fi
>
> I guess that should be || instead of &&?Oops, yeah. I wrote it correctly and tested it once, and then started to rewrite it to support setting it to 0, like:
if test -z "$GIT_TEST_USE_SET_E" && test "${BASH_VERSINFO:=0}" -ge 5
then
GIT_TEST_USE_SET_E=1
fi
case "$GIT_TEST_USE_SET_E" in
1|on|true)
set -e
;;
esacBut I didn't want to get too much into details of the patch, so I went back to the original, but obviously screwed that up. ;)
-Peff