aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-09-13 15:29:13 +0200
committerEelco Dolstra <edolstra@gmail.com>2022-09-13 15:29:13 +0200
commitc6ff33ff5c83a546fc6e82055aa04abfe41011dc (patch)
treebdc5dbda95f454bdd4a685062ea5f525dff25384 /src
parent0f64bf445a229c4f5ce19dc19a552f58701ca1ca (diff)
RunPager: Stop the progress bar
In particular, the progress bar was interfering with 'less' rendering in '--help' (e.g. run 'nix --help' and hit '/' to search).
Diffstat (limited to 'src')
-rw-r--r--src/libmain/shared.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 52b75f757..c1cf38565 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -4,6 +4,7 @@
#include "gc-store.hh"
#include "util.hh"
#include "loggers.hh"
+#include "progress-bar.hh"
#include <algorithm>
#include <cctype>
@@ -422,6 +423,8 @@ RunPager::RunPager()
if (!pager) pager = getenv("PAGER");
if (pager && ((std::string) pager == "" || (std::string) pager == "cat")) return;
+ stopProgressBar();
+
Pipe toPager;
toPager.create();