Skip to content

Commit 189db80

Browse files
authored
🐛 Don't swallow stderr output (#269)
cc @jorenham I was looking into python/mypy#18756 (comment) It looks like the pre-release version of mypy crashes (for some reason related to property changes, will investigate). Crash logs are emitted to stderr and process exits with exit code 2. This code does correctly chain the exit code, but swallows stderr.
1 parent 864cda2 commit 189db80

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tool/stubtest.py

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def main() -> int:
128128
capture_output=True,
129129
env={"FORCE_COLOR": "1"} | os.environ,
130130
)
131+
sys.stderr.buffer.write(result.stderr)
131132
output = _rewrite_mypy_output(result.stdout)
132133
sys.stdout.buffer.write(output)
133134
sys.stdout.buffer.flush()

0 commit comments

Comments
 (0)