Skip to content

Commit

Permalink
Display the errors raised by 'quarto' (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts authored Dec 1, 2021
1 parent 6fee30c commit 002fa06
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jupytext/quarto.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ def quarto(args, filein=None):
if filein:
cmd.append(filein)

proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = proc.communicate()
if proc.returncode:
raise QuartoError(
f"{' '.join(cmd)} exited with return code {proc.returncode}\n{err}"
f"{' '.join(cmd)} exited with return code {proc.returncode}\n{err.decode('utf-8')}"
)

return out.decode("utf-8")


Expand Down

0 comments on commit 002fa06

Please sign in to comment.