Filter ANSI colors when not writing to a terminal
Fixes https://github.com/NixOS/nixpkgs/issues/37114.
This commit is contained in:
parent
7b8914825a
commit
4868721506
4 changed files with 10 additions and 8 deletions
|
|
@ -308,7 +308,7 @@ public:
|
|||
auto width = getWindowSize().second;
|
||||
if (width <= 0) std::numeric_limits<decltype(width)>::max();
|
||||
|
||||
writeToStderr("\r" + filterANSIEscapes(line, width) + "\e[K");
|
||||
writeToStderr("\r" + filterANSIEscapes(line, false, width) + "\e[K");
|
||||
}
|
||||
|
||||
std::string getStatus(State & state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue