3 ms·
The disappointment with set -e is that it does not work everywhere: - with an unset 'hello' variable, try: set -eu echo "`echo $hello` world" echo "huh
by pflanze 12y ago
The disappointment with set -e is that it does not work everywhere:
- with an unset 'hello' variable, try:
set -eu
echo "`echo $hello` world"
echo "huh still going?!"
foo="`echo $hello` world"
echo "not reaching this as expected"
Fun, now you have to manually write your whole program in what's basically SSA (static single assignment) form.
- It's deactivated in if/then context, which at first makes sense, but then when you try to force it on explicitely like:
set -eu
if (set -eu; false; true); then
echo "huh why still true??"
else
echo false
fi
and your declaration is just ignored.. you begin to wonder how many places set -e misses really.