authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-12 21:45:43-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-13 11:32:46+02:00
log2e77ff7ca9c25a262969cf55992d0bf2ecaa483d
tree1d3e4baab67291427858ab2484738b1b13267026
parent613c03321a0970cce3a5d04ede04ab4a24ac1dbb

zig build: lock stderr before replacing process image

fixes not clearing `std.Progress` output before executing maker

1 files changed, 1 insertions(+), 0 deletions(-)

src/main.zig+1
...@@ -5134,6 +5134,7 @@ fn jitCmdInner(...@@ -5134,6 +5134,7 @@ fn jitCmdInner(
5134 }5134 }
51355135
5136 if (process.can_replace and options.capture == null) {5136 if (process.can_replace and options.capture == null) {
5137 _ = try io.lockStderr(&.{}, .no_color);
5137 const err = process.replace(io, .{ .argv = child_argv.items, .environ_map = environ_map });5138 const err = process.replace(io, .{ .argv = child_argv.items, .environ_map = environ_map });
5138 const cmd = try std.mem.join(arena, " ", child_argv.items);5139 const cmd = try std.mem.join(arena, " ", child_argv.items);
5139 fatal("the following command failed to execve with {t}:\n{s}", .{ err, cmd });5140 fatal("the following command failed to execve with {t}:\n{s}", .{ err, cmd });