diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py index 53be577..defe3e7 100755 --- a/IPython/terminal/ipapp.py +++ b/IPython/terminal/ipapp.py @@ -356,6 +356,8 @@ class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): self.shell.mainloop() else: self.log.debug("IPython not interactive...") + if not self.shell.last_execution_succeeded: + sys.exit(1) def load_default_config(ipython_dir=None): """Load the default config file from the default ipython_dir.