Re:Why doesn't Bash's `set -e` do what I expected?
by oftheoaks on Friday October 07, 2022 @12:08PM
(#33123224)
This is really interesting. The case pointed out in Ex.3 is pretty hilarious:
(from the bash manual)
The ERR trap [same rules as set -e] is not executed if the
failed command is part of the command list immediately following
a while or until keyword, part of the test in an if statement,
part of a command executed in a && or || list except the command
following the final && or || [...]
(from the bash manual)