Skip to content

Commit

Permalink
Fix eachdist.py not printing invoked commands. (#1758)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Oberon00 authored Apr 9, 2021
1 parent 88157a4 commit 6f8c077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/eachdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def runsubprocess(dry_run, params, *args, **kwargs):

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

print(">>>", cmdstr, file=sys.stderr)
print(">>>", cmdstr, file=sys.stderr, flush=True)

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

params = list(params)
executable = shutil.which(params[0]) # On Win32, pytho
executable = shutil.which(params[0])
if executable:
params[0] = executable
try:
Expand Down

0 comments on commit 6f8c077

Please sign in to comment.