diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 03:47:11 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 04:36:19 +0100 |
commit | 8867479b2712d244dc3fd3829ba6710a0c14ebab (patch) | |
tree | 5636d84beb5498df656e0c6f94f2931534ab767e /src | |
parent | f17e7b185597715049fa7a12e6a0512ef66801b6 (diff) |
Merge pull request #9056 from aakropotkin/patch-1
Respect `NOCOLOR`
(cherry picked from commit 4b78a66bc5066fab46b4c84a5b85c3839e9d8aab)
Change-Id: I005a13dea6cb33133f7bc59926cbaf5cf51c561a
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/util.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 5a10c69e2..3b4c181e5 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -1515,7 +1515,7 @@ bool shouldANSI() { return isatty(STDERR_FILENO) && getEnv("TERM").value_or("dumb") != "dumb" - && !getEnv("NO_COLOR").has_value(); + && !(getEnv("NO_COLOR").has_value() || getEnv("NOCOLOR").has_value()); } std::string filterANSIEscapes(std::string_view s, bool filterAll, unsigned int width) |