diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-10-09 23:25:06 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-10-09 23:25:06 +0200 |
commit | 4331eeb13d241dfe2d2e6a01c53915c556cac94f (patch) | |
tree | c5b88e862736877ef81decf80fac7c64820b9208 | |
parent | 55bba8e4f51758e6c0556b24743e6946c96f6d92 (diff) |
Filter ANSI escape sequences in -L output
Otherwise, builds like NixOS VM tests may leave the terminal in a
weird state and do resets.
-rw-r--r-- | src/nix/progress-bar.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc index c0bcfb0c9..5c05d6b22 100644 --- a/src/nix/progress-bar.cc +++ b/src/nix/progress-bar.cc @@ -120,7 +120,7 @@ public: void log(State & state, Verbosity lvl, const std::string & s) { if (state.active) { - writeToStderr("\r\e[K" + s + ANSI_NORMAL "\n"); + writeToStderr("\r\e[K" + filterANSIEscapes(s, !isTTY) + ANSI_NORMAL "\n"); draw(state); } else { auto s2 = s + ANSI_NORMAL "\n"; |