Skip to content

Commit

Permalink
Fix run_with_logging(): add missing subprocess.PIPE
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Sep 28, 2024
1 parent 3b9d1fa commit 5f97cca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,14 @@ def run_with_logging(cmd, cwd=None):
"""Like subprocess.check_call, with logging before the command execution."""
cmd = list(map(str, cmd))
logging.debug("Run: %s", shlex.join(cmd))
with subprocess.Popen(cmd, cwd=cwd, encoding="utf-8") as p:
with subprocess.Popen(
cmd,
cwd=cwd,
stdin=subprocess.PIPE,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE,
encoding="utf-8",
) as p:
try:
for line in (p.stdout or ()):
logging.debug(">>>> %s", line.rstrip())
Expand Down

0 comments on commit 5f97cca

Please sign in to comment.