diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-03-15T15·08+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-03-15T15·08+0100 |
commit | 486872150638d56483c2bc429ba9e137d9974ee8 (patch) | |
tree | 469f6346618c2fbe1eb2e4282ef7e6cc90c01ff5 /src/libutil/logging.cc | |
parent | 7b8914825a6b02173976eae0ca59053085d4b20a (diff) |
Filter ANSI colors when not writing to a terminal
Fixes https://github.com/NixOS/nixpkgs/issues/37114.
Diffstat (limited to 'src/libutil/logging.cc')
-rw-r--r-- | src/libutil/logging.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index e860b27d3d0b..799c6e1ae441 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -53,7 +53,7 @@ public: prefix = std::string("<") + c + ">"; } - writeToStderr(prefix + filterANSIEscapes(fs.s) + "\n"); + writeToStderr(prefix + filterANSIEscapes(fs.s, !tty) + "\n"); } void startActivity(ActivityId act, Verbosity lvl, ActivityType type, |