-
Notifications
You must be signed in to change notification settings - Fork 146
Closed
Description
Setting the xtrace option (e.g. via set -x) results in an exit code of 1 for that cell, and subsequently-executed cells.
Here is the contents of the notebook:
echo foo # exits with code 0
set -x # exits with code 1
echo foo # exits with code 1And a screenshot of the same notebook:
As a sanity check, here's what this looks like in a "standard" bash shell (bash 5.2.9 in terminator 2.1.1):
$ echo foo; echo $?
foo
0
$ set -x; echo $?
+ echo 0
0
$ echo foo; echo $?
+ echo foo
foo
+ echo 0
0No non-zero exit codes.
And for the sake of completeness, from $ help set:
-x Print commands and their arguments as they are executed.
Is there any known explanation for, or workaround to, this?
Environment details:
$ cat /etc/fedora-release
Fedora release 37 (Thirty Seven)
$ python --version
Python 3.11.0
$ jupyter --version
Selected Jupyter core packages...
IPython : 8.6.0
ipykernel : 6.18.1
ipywidgets : not installed
jupyter_client : 7.4.7
jupyter_core : 5.1.0
jupyter_server : 1.23.3
jupyterlab : 3.5.0
nbclient : 0.7.0
nbconvert : 7.2.5
nbformat : 5.7.0
notebook : 6.5.2
qtconsole : not installed
traitlets : 5.5.0
$ pip show bash_kernel | grep Version
Version: 0.8.0Thanks
Metadata
Metadata
Assignees
Labels
No labels
