I don’t have the Bash experience to argue against that, but from a general programming experience, I want things to crash as loudly as possible when anything unexpected happens. Otherwise, you might never spot it failing.
Well, and nevermind that it could genuinely break things, if an intermediate step fails, but it continues running.
















What I always find frustrating about that, is that even a colleague with much more Bash experience than me, will ask me what those options are, if I slap a
set -euo pipefailor similar into there.I guess, I could prepare a snippet like in the article with proper comments instead:
Maybe with the whole trapping thing, too.
But yeah, will have to remember to use that. Most Bash scripts start out as just quickly trying something out, so it’s easy to forget setting the proper options…