Skip to content

Commit 81c44b3

Browse files
committed
forward build runner progress when ZIG_PROGRESS is set (ziglang#24733)
1 parent 163eda0 commit 81c44b3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main.zig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5470,6 +5470,14 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
54705470
child.stdout_behavior = .Inherit;
54715471
child.stderr_behavior = .Inherit;
54725472

5473+
// If a parent process is requesting participation in an already-existing
5474+
// progress node, then send the progress data from the build runner to
5475+
// the parent progress directly instead of the CLI.
5476+
if (std.process.hasNonEmptyEnvVarConstant("ZIG_PROGRESS")) {
5477+
root_prog_node.setName("");
5478+
child.progress_node = root_prog_node;
5479+
}
5480+
54735481
const term = t: {
54745482
std.debug.lockStdErr();
54755483
defer std.debug.unlockStdErr();

0 commit comments

Comments
 (0)