4 ms·
set -e and set -u both come with their own pitfalls: https://mywiki.wooledge.org/BashFAQ/105 https://mywiki.wooledge.org/BashFAQ/105 and https://mywiki.wooledge
by bewuethr 6y ago
set -e and set -u both come with their own pitfalls: https://mywiki.wooledge.org/BashFAQ/105 https://mywiki.wooledge.org/BashFAQ/105 and https://mywiki.wooledge.org/BashFAQ/112 https://mywiki.wooledge.org/BashFAQ/112
I generally use them and think that overall, they have more benefits than drawbacks, but the odd time where I run into one of the pitfalls, debugging usually takes a while.
ShellCheck already does a pretty good job of pointing out incorrect variable names, too.