Skip to content

Commit bf73620

Browse files
committed
build runner: communicate TTY conf to child procs via env vars
1 parent 28bda2e commit bf73620

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/build_runner.zig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ pub fn main() !void {
272272

273273
const stderr = std.io.getStdErr();
274274
const ttyconf = get_tty_conf(color, stderr);
275+
switch (ttyconf) {
276+
.no_color => try builder.env_map.put("NO_COLOR", "1"),
277+
.escape_codes => try builder.env_map.put("ZIG_DEBUG_COLOR", "1"),
278+
.windows_api => {},
279+
}
275280

276281
var progress: std.Progress = .{ .dont_print_on_dumb = true };
277282
const main_progress_node = progress.start("", 0);

0 commit comments

Comments
 (0)