-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Milestone
Description
Think of this as an alternative to set -e in bash. What it would do is abort the whole script, if a single line fails.
This is useful in cases like this
import foo
do_some_magic
import barin this case you definitely don't want to do_some_magic if import foo fails.
It might also be good to have this option available just for blocks, so that you could do
some_magic
begin -e # or whatever the switch will be
first_thing # if this fails, the whole block will exit
second_thing
end
some_more_magicUsing and is not a solution for more than two commands, as it pollutes the script, makes it harder to refactor, etc.
presidento, arkban, MrAnno, mcandre, laughedelic and 50 more