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).
This commit is contained in:
Eelco Dolstra 2022-09-13 15:29:13 +02:00
parent 0f64bf445a
commit c6ff33ff5c
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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();