aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authordweiller <4678790+dweiller@users.noreplay.github.com>2023-06-22 10:14:36 +1000
committerdweiller <4678790+dweiller@users.noreplay.github.com>2023-06-22 10:29:45 +1000
commite45d24c0de29eb6668e56ea927e15505674833a6 (patch)
tree22f846a9598c189d37e8b15aaf39ef049ea43de4 /lib/std
parente05412669c8dde1230612de5af64fbc3fb0bc17e (diff)
downloadzig-e45d24c0de29eb6668e56ea927e15505674833a6.tar.gz
zig-e45d24c0de29eb6668e56ea927e15505674833a6.zip
rename ZIG_DEBUG_COLOR env variable to YES_COLOR
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/io/tty.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/io/tty.zig b/lib/std/io/tty.zig
index 4f91d01ff8..bbae90198e 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