2 ms·
That one is OK. What's NOT OK is that conditionals disable set -e in functions that appear in the conditionals, so: function foo { false; true; } foo || e
by cryptonector 6y ago
That one is OK. What's NOT OK is that conditionals disable set -e in functions that appear in the conditionals, so:
function foo { false; true; }
foo || echo foo failed
prints nothing.
- mehrdadn 6y agoOuch, that's horrible. Thanks!
- chubot 6y agoYes, that's #1 the "if myfunc" problem I mentioned here: https://news.ycombinator.com/item?id=24740842 https://news.ycombinator.com/item?id=24740842 shopt -s strict_errexit in Oil disallows that (a runtime assertion 100% of the time). Feedback is welcome! https://github.com/oilshell/oil/issues/709 https://github.com/oilshell/oil/issues/709