Commit e6b6a728b3

Andrew Kelley <andrew@ziglang.org>
2024-07-10 05:06:56
build runner: fix build summary painting over CLI progress
by obtaining the stderr lock when printing the build summary
1 parent 001ff7b
Changed files (1)
lib
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 {};