Skip to content

Commit 6f8c077

Browse files
authored
Fix eachdist.py not printing invoked commands. (#1758)
I observed the following pattern: ``` <output of cmd 1> <output of cmd 2> >>> cmd1 >>> cmd2 ``` The `>>> cmd` header should come immediately before the command output to facilitate debugging & progress reporting.
1 parent 88157a4 commit 6f8c077

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/eachdist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def runsubprocess(dry_run, params, *args, **kwargs):
343343

344344
check = kwargs.pop("check") # Enforce specifying check
345345

346-
print(">>>", cmdstr, file=sys.stderr)
346+
print(">>>", cmdstr, file=sys.stderr, flush=True)
347347

348348
# This is a workaround for subprocess.run(['python']) leaving the virtualenv on Win32.
349349
# The cause for this is that when running the python.exe in a virtualenv,
@@ -356,7 +356,7 @@ def runsubprocess(dry_run, params, *args, **kwargs):
356356
# Only this would find the "correct" python.exe.
357357

358358
params = list(params)
359-
executable = shutil.which(params[0]) # On Win32, pytho
359+
executable = shutil.which(params[0])
360360
if executable:
361361
params[0] = executable
362362
try:

0 commit comments

Comments
 (0)