Skip to content

Commit 3e5b5f0

Browse files
committed
Fix duplicate stderr
1 parent 4c6859f commit 3e5b5f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils/cmd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,13 @@ def run_subprocess(
279279

280280
## Handle stderr
281281
if "ignore" in stderr:
282-
stderr = subprocess.DEVNULL
282+
stderr_int = subprocess.DEVNULL
283283
# If we want to separate it out into its own output
284284
elif "stderr" in stderr:
285-
stderr = subprocess.PIPE
285+
stderr_int = subprocess.PIPE
286286
else:
287287
# Redirect stderr to stdout for simplicity
288-
stderr = subprocess.STDOUT
288+
stderr_int = subprocess.STDOUT
289289

290290
## Handle text vs byte mode
291291
# Byte mode is needed for stdout / stdin interaction
@@ -312,7 +312,7 @@ def run_subprocess(
312312
# TODO: Disable text = True, and handle stdin / out / err pipes as byte streams, so that stdout can be checked without waiting for a newline
313313
sub_process = psutil.Popen(
314314
args = args,
315-
stderr = stderr,
315+
stderr = stderr_int,
316316
stdin = subprocess.PIPE,
317317
stdout = subprocess.PIPE,
318318
text = text,

0 commit comments

Comments
 (0)