From 85e4bd2e1e6bf35a2c818d553667cedc6511ac08 2018-09-06 18:20:08 From: Matthias Bussonnier Date: 2018-09-06 18:20:08 Subject: [PATCH] Switch scripts cell magic default to raise if error happens. Close #11198 --- diff --git a/IPython/core/magics/script.py b/IPython/core/magics/script.py index d84b271..8b7f6f9 100644 --- a/IPython/core/magics/script.py +++ b/IPython/core/magics/script.py @@ -55,7 +55,7 @@ def script_args(f): """ ), magic_arguments.argument( - '--raise-error', action="store_true", + '--no-raise-error', action="store_false", dest='raise_error', help="""Whether you should raise an error message in addition to a stream on stderr if you get a nonzero exit code. """ diff --git a/docs/source/whatsnew/pr/bash_raise_default.rst b/docs/source/whatsnew/pr/bash_raise_default.rst new file mode 100644 index 0000000..dc2a14e --- /dev/null +++ b/docs/source/whatsnew/pr/bash_raise_default.rst @@ -0,0 +1,4 @@ +The ``%%script`` (as well as ``%%bash``, ``ruby``... ) cell magic no raise by +default if the return code of the given code is non-zero (this halting execution +of further cells in a notebook). The behavior can be disable by passing the +``--no-raise-error`` flag.