set -e at the beginning of the bash script instructs bash to fail the whole script on first failure of any command inside.
Is there any equivalent to use with ipython script which invokes bash commands through !command?
As noted in check the exit status of last command in ipython, there is an _exit_code variable. What you want to do is thus equivalent to adding an assert _exit_code==0 after each shell command. I have not found a feature to do the check automatically, but I'm not that familiar with ipython.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With