Skip to content

Commit 9907f17

Browse files
committed
Run jupyter lite with subprocess.run to not suppress stdout
check_output redirects stdout, so we don't see it when we do sphinx-build. We instead switch to using subprocess.run so that we can see the stdout output. Suppressing stdout was causing errors in jupyter lite to not be displayed, which was very confusing. A separate issue is that jupyter lite is not returning a nonzero exit code when there is an error. But that is a problem to solve in jupyter lite. Once it is solved, having the check=True means that the sphinx build will also raise an error.
1 parent e8a21e9 commit 9907f17

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jupyterlite_sphinx.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def jupyterlite_build(app: Sphinx, error):
268268
config = ["--config", app.env.config.jupyterlite_config]
269269

270270
with tempfile.TemporaryDirectory() as tmp_dir:
271-
subprocess.check_output(
271+
subprocess.run(
272272
[
273273
"jupyter",
274274
"lite",
@@ -281,7 +281,8 @@ def jupyterlite_build(app: Sphinx, error):
281281
os.path.join(app.srcdir, CONTENT_DIR),
282282
"--output-dir",
283283
os.path.join(app.outdir, JUPYTERLITE_DIR),
284-
]
284+
],
285+
check=True
285286
)
286287

287288
print("[jupyterlite-sphinx] JupyterLite build done")

0 commit comments

Comments
 (0)