zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit e6b6a728b36335d9ac32dd216082aaf1faa6327e (tree)
parent 001ff7b3b2176467a9169069938396dcca75e93c
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue,  9 Jul 2024 20:06:56 -0700

build runner: fix build summary painting over CLI progress

by obtaining the stderr lock when printing the build summary

Diffstat:
Mlib/compiler/build_runner.zig | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/compiler/build_runner.zig b/lib/compiler/build_runner.zig @@ -682,9 +682,12 @@ fn runStepNames( } const ttyconf = run.ttyconf; - const stderr = run.stderr; if (run.summary != .none) { + std.debug.lockStdErr(); + defer std.debug.unlockStdErr(); + const stderr = run.stderr; + const total_count = success_count + failure_count + pending_count + skipped_count; ttyconf.setColor(stderr, .cyan) catch {}; stderr.writeAll("Build Summary:") catch {};