Skip to content

Commit 9b3909f

Browse files
author
dweiller
committed
rename ZIG_DEBUG_COLOR env variable to NO_COLOR
1 parent d477adb commit 9b3909f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

doc/docgen.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ fn genHtml(
13051305
defer root_node.end();
13061306

13071307
var env_map = try process.getEnvMap(allocator);
1308-
try env_map.put("ZIG_DEBUG_COLOR", "1");
1308+
try env_map.put("NO_COLOR", "1");
13091309

13101310
const host = try std.zig.system.NativeTargetInfo.detect(.{});
13111311
const builtin_code = try getBuiltinCode(allocator, &env_map, zig_exe, opt_zig_lib_dir);

lib/build_runner.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ pub fn main() !void {
282282
const ttyconf = get_tty_conf(color, stderr);
283283
switch (ttyconf) {
284284
.no_color => try builder.env_map.put("NO_COLOR", "1"),
285-
.escape_codes => try builder.env_map.put("ZIG_DEBUG_COLOR", "1"),
285+
.escape_codes => try builder.env_map.put("NO_COLOR", "1"),
286286
.windows_api => {},
287287
}
288288

lib/std/io/tty.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ const native_os = builtin.os.tag;
77

88
/// Detect suitable TTY configuration options for the given file (commonly stdout/stderr).
99
/// This includes feature checks for ANSI escape codes and the Windows console API, as well as
10-
/// respecting the `ZIG_DEBUG_COLOR` and `YES_COLOR` environment variables to override the default.
10+
/// respecting the `NO_COLOR` and `YES_COLOR` environment variables to override the default.
1111
pub fn detectConfig(file: File) Config {
1212
const force_color: ?bool = if (builtin.os.tag == .wasi)
1313
null // wasi does not support environment variables
14-
else if (process.hasEnvVarConstant("ZIG_DEBUG_COLOR"))
14+
else if (process.hasEnvVarConstant("NO_COLOR"))
1515
false
1616
else if (process.hasEnvVarConstant("YES_COLOR"))
1717
true

test/src/StackTrace.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fn addExpect(
8181
});
8282

8383
const run = b.addRunArtifact(exe);
84-
run.removeEnvironmentVariable("ZIG_DEBUG_COLOR");
84+
run.removeEnvironmentVariable("NO_COLOR");
8585
run.setEnvironmentVariable("NO_COLOR", "1");
8686
run.expectExitCode(1);
8787
run.expectStdOutEqual("");

0 commit comments

Comments
 (0)