8000 Fix ``run_with_logging()``: add missing ``subprocess.PIPE`` · python/docsbuild-scripts@5f97cca · GitHub
[go: up one dir, main page]

Skip to content

Commit 5f97cca

Browse files
committed
Fix run_with_logging(): add missing subprocess.PIPE
1 parent 3b9d1fa commit 5f97cca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

build_docs.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,14 @@ def run_with_logging(cmd, cwd=None):
246246
"""Like subprocess.check_call, with logging before the command execution."""
247247
cmd = list(map(str, cmd))
248248
logging.debug("Run: %s", shlex.join(cmd))
249-
with subprocess.Popen(cmd, cwd=cwd, encoding="utf-8") as p:
249+
with subprocess.Popen(
250+
cmd,
251+
cwd=cwd,
252+
stdin=subprocess.PIPE,
253+
stderr=subprocess.STDOUT,
254+
stdout=subprocess.PIPE,
255+
encoding="utf-8",
256+
) as p:
250257
try:
251258
for line in (p.stdout or ()):
252259
logging.debug(">>>> %s", line.rstrip())

0 commit comments

Comments
 (0)
0