I was surprised when I found that the following two statements behave
differently when run with set -o errexit. The statements are inside a
function.
# shell does not abort, even though errexit is set. Why not?
local var=$(false)
# shell does exit as I expect
local var
var=$(false)
I tried it in 4.3.11 and 4.2.25. Why is the behaviour as it is? It
seems non intuitive to me.
Christoph
PS Please CC as I'm not subscribed to the list.