Skip to content

Commit 1163aa0

Browse files
tsafinigormunkin
authored andcommitted
debugger: use NO_COLOR to disable coloring
Do not use non-standard DBG_NOCOLOR, but use NO_COLOR [^1] for disabling color output on terminals. [^1]: https://no-color.org/ NO_DOC=later NO_CHANGELOG=internal NO_TEST=internal
1 parent f7a5336 commit 1163aa0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

third_party/lua/README-luadebug.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ There are also some goodies you can use to make debugging easier.
110110
Environment Variables:
111111
-
112112
113-
Want to disable ANSI color support or disable GNU readline? Set the `DBG_NOCOLOR` and/or `DBG_NOREADLINE` environment variables.
113+
Want to disable ANSI color support or disable GNU readline? Set the `NO_COLOR`.
114114
115115
Known Issues:
116116
-

third_party/lua/luadebug.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ local stdout_isatty = ffi.C.isatty(1)
750750

751751
-- Conditionally enable color support.
752752
local color_maybe_supported = (stdout_isatty and os.getenv("TERM") and os.getenv("TERM") ~= "dumb")
753-
if color_maybe_supported and not os.getenv("DBG_NOCOLOR") then
753+
if color_maybe_supported and not os.getenv("NO_COLOR") then
754754
COLOR_GRAY = string.char(27) .. "[90m"
755755
COLOR_RED = string.char(27) .. "[91m"
756756
COLOR_BLUE = string.char(27) .. "[94m"

0 commit comments

Comments
 (0)