diff --git a/doc/docgen.zig b/doc/docgen.zig index 93cc316de18be60fc964aad8f6e59c8d343ca02b..675dcccf70b599600112fd894e7b4bc3a38ad52f 100644 --- a/doc/docgen.zig +++ b/doc/docgen.zig @@ -1305,7 +1305,7 @@ fn genHtml( defer root_node.end(); var env_map = try process.getEnvMap(allocator); - try env_map.put("ZIG_DEBUG_COLOR", "1"); + try env_map.put("YES_COLOR", "1"); const host = try std.zig.system.NativeTargetInfo.detect(.{}); const builtin_code = try getBuiltinCode(allocator, &env_map, zig_exe, opt_zig_lib_dir); diff --git a/lib/build_runner.zig b/lib/build_runner.zig index a5abbebe168e3be6f42193045667c82168f55fd3..cdedba90b2d60a0f5d16fb227e23d9491808d5a2 100644 --- a/lib/build_runner.zig +++ b/lib/build_runner.zig @@ -282,7 +282,7 @@ pub fn main() !void { const ttyconf = get_tty_conf(color, stderr); switch (ttyconf) { .no_color => try builder.env_map.put("NO_COLOR", "1"), - .escape_codes => try builder.env_map.put("ZIG_DEBUG_COLOR", "1"), + .escape_codes => try builder.env_map.put("YES_COLOR", "1"), .windows_api => {}, } diff --git a/lib/std/io/tty.zig b/lib/std/io/tty.zig index 4f91d01ff8d0d2f1efc0903fac8efc97c5387cb8..bbae90198ed963c496dc3846874851ee0300f70b 100644 --- a/lib/std/io/tty.zig +++ b/lib/std/io/tty.zig @@ -7,11 +7,11 @@ const native_os = builtin.os.tag; /// Detect suitable TTY configuration options for the given file (commonly stdout/stderr). /// This includes feature checks for ANSI escape codes and the Windows console API, as well as -/// respecting the `ZIG_DEBUG_COLOR` and `YES_COLOR` environment variables to override the default. +/// respecting the `NO_COLOR` and `YES_COLOR` environment variables to override the default. pub fn detectConfig(file: File) Config { const force_color: ?bool = if (builtin.os.tag == .wasi) null // wasi does not support environment variables - else if (process.hasEnvVarConstant("ZIG_DEBUG_COLOR")) + else if (process.hasEnvVarConstant("NO_COLOR")) false else if (process.hasEnvVarConstant("YES_COLOR")) true diff --git a/test/src/StackTrace.zig b/test/src/StackTrace.zig index 0552b419c0d952e7f2fa2a7193a9112a167d2877..71394e00b8ec9a08beb2d32f1e0cd95cd3a16c49 100644 --- a/test/src/StackTrace.zig +++ b/test/src/StackTrace.zig @@ -81,7 +81,7 @@ fn addExpect( }); const run = b.addRunArtifact(exe); - run.removeEnvironmentVariable("ZIG_DEBUG_COLOR"); + run.removeEnvironmentVariable("YES_COLOR"); run.setEnvironmentVariable("NO_COLOR", "1"); run.expectExitCode(1); run.expectStdOutEqual("");