Skip to content

Commit

Permalink
fix: Update run_with_catch log flushing (#2806)
Browse files Browse the repository at this point in the history
Co-authored-by: Neil Ramsay <[email protected]>
  • Loading branch information
neilramsay and neilramsay authored Nov 26, 2024
1 parent f74c000 commit d619967
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/virtualenv/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def run_with_catch(args=None, env=None):
code = exception.code if isinstance(exception, SystemExit) else 1
sys.exit(code)
finally:
LOGGER.shutdown() # force flush of log messages before the trace is printed
for handler in LOGGER.handlers: # force flush of log messages before the trace is printed
handler.flush()


if __name__ == "__main__": # pragma: no cov
Expand Down

0 comments on commit d619967

Please sign in to comment.