Strict Mode
NOTE: do a write up why bash "strict mode".
set -Eeuo pipefail
Local tidbits on where strict mode falls short
- Flag for Exiting on non-zero (set -e)
- Biggest gotcha with
set -eis ā Checking for failure/success, even up the chain prevents 'set -e' from triggering.ā
- Biggest gotcha with
External References: For strict mode
- guettli/bash-strict-mode: Bash Strict Mode
- Bash strict mode and why you should care | PoorlyWritten
- Use Bash Strict Mode (Unless You Love Debugging)
External References: Against strict mode
- Don't blindly use set -euo pipefail.
- BashFAQ/105 - Greg's Wiki
- why does errexit exist in its current utterly useless form?
Possible solutions
- Osh Oil Shell - new shell runtime. Need to test whether it supports bash constructs like
$BASHPID