Date: Wed, 14 Jan 2026 01:18:47 +0000
From: David Holland <[email protected]>
Message-ID: <[email protected]>
| I discovered the following today.
I would have expected you to be aware of all this already.
| This seems wrong - the exit status of the f is guarded, but the false
| is not.
Doesn't matter, it is executing in a place to the left of a || hence
the setting of -e is ignored.
| Is this intended, and is there a way to get the user's intended
| behavior of exit on unchecked failure back?
It is, and no, there isn't. Use of -e in anything other than a list of
simple commands, one after the other, almost always runs into problems.
It was originally intended for (old style) makefile use, not for lazy
script writers.
Simply explicitly test every command's status which matters, explicitly,
and everything will work as you intend. Don't use -e, almost ever.
(And -u isn't a lot better, but at least that one is more predictable).
kre