Automatic `set -e` might not be a good idea
fcard opened this issue · 1 comments
fcard commented
The idea of halting on errors is very good and still worth exploring, but set -e has two problems:
- It doesn't exist in POSIX mode
- It's far from perfect and can be surprising
For point 2, check this link: http://mywiki.wooledge.org/BashFAQ/105
We can still have the "halting on error" without set -e, and we can do it more accurately since we have a compiler instead of a interpreter. It will take some work, tho.
coderofsalvation commented
I'm not sure on this one.
I agree set -e is not perfect, but better than nothing.
Lets re-open this issue in case we notice most people using powscript to port bash to powscript.
(Then it would be a priority i guess)