From 486872150638d56483c2bc429ba9e137d9974ee8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 15 Mar 2018 16:08:07 +0100 Subject: Filter ANSI colors when not writing to a terminal Fixes https://github.com/NixOS/nixpkgs/issues/37114. --- src/libutil/logging.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libutil/logging.cc') 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, -- cgit 1.4.1