Merge pull request #7032 from edolstra/stop-progress-bar

RunPager: Stop the progress bar
This commit is contained in:
Eelco Dolstra 2022-09-13 16:57:30 +02:00 committed by GitHub
commit b56906aae0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@
#include "gc-store.hh" #include "gc-store.hh"
#include "util.hh" #include "util.hh"
#include "loggers.hh" #include "loggers.hh"
#include "progress-bar.hh"
#include <algorithm> #include <algorithm>
#include <cctype> #include <cctype>
@ -422,6 +423,8 @@ RunPager::RunPager()
if (!pager) pager = getenv("PAGER"); if (!pager) pager = getenv("PAGER");
if (pager && ((std::string) pager == "" || (std::string) pager == "cat")) return; if (pager && ((std::string) pager == "" || (std::string) pager == "cat")) return;
stopProgressBar();
Pipe toPager; Pipe toPager;
toPager.create(); toPager.create();