From 1163aa056398e21fbbedc25bcc9aa858fad9cdff Mon Sep 17 00:00:00 2001
From: Timur Safin <tsafin@tarantool.org>
Date: Fri, 23 Sep 2022 01:29:16 +0300
Subject: [PATCH] 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
---
 third_party/lua/README-luadebug.md | 2 +-
 third_party/lua/luadebug.lua       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/third_party/lua/README-luadebug.md b/third_party/lua/README-luadebug.md
index 4a94dd03f6..c92479bede 100644
--- a/third_party/lua/README-luadebug.md
+++ b/third_party/lua/README-luadebug.md
@@ -110,7 +110,7 @@ There are also some goodies you can use to make debugging easier.
 Environment Variables:
 -
 
-Want to disable ANSI color support or disable GNU readline? Set the `DBG_NOCOLOR` and/or `DBG_NOREADLINE` environment variables.
+Want to disable ANSI color support or disable GNU readline? Set the `NO_COLOR`.
 
 Known Issues:
 -
diff --git a/third_party/lua/luadebug.lua b/third_party/lua/luadebug.lua
index d45bca057b..11bc3c959c 100644
--- a/third_party/lua/luadebug.lua
+++ b/third_party/lua/luadebug.lua
@@ -750,7 +750,7 @@ local stdout_isatty = ffi.C.isatty(1)
 
 -- Conditionally enable color support.
 local color_maybe_supported = (stdout_isatty and os.getenv("TERM") and os.getenv("TERM") ~= "dumb")
-if color_maybe_supported and not os.getenv("DBG_NOCOLOR") then
+if color_maybe_supported and not os.getenv("NO_COLOR") then
     COLOR_GRAY = string.char(27) .. "[90m"
     COLOR_RED = string.char(27) .. "[91m"
     COLOR_BLUE = string.char(27) .. "[94m"
-- 
GitLab