diff options
Diffstat (limited to 'src/nix/prefetch.cc')
-rw-r--r-- | src/nix/prefetch.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nix/prefetch.cc b/src/nix/prefetch.cc index cad70e726..13d94d645 100644 --- a/src/nix/prefetch.cc +++ b/src/nix/prefetch.cc @@ -1,10 +1,10 @@ #include "command.hh" #include "common-args.hh" +#include "loggers.hh" #include "shared.hh" #include "store-api.hh" #include "filetransfer.hh" #include "finally.hh" -#include "progress-bar.hh" #include "tarfile.hh" #include "attr-path.hh" #include "eval-inline.hh" @@ -180,10 +180,8 @@ static int main_nix_prefetch_url(int argc, char * * argv) if (args.size() > 2) throw UsageError("too many arguments"); - Finally f([]() { stopProgressBar(); }); - if (isatty(STDERR_FILENO)) - startProgressBar(); + setLogFormat(LogFormat::bar); auto store = openStore(); auto state = std::make_unique<EvalState>(myArgs.searchPath, store); @@ -237,7 +235,7 @@ static int main_nix_prefetch_url(int argc, char * * argv) auto [storePath, hash] = prefetchFile( store, resolveMirrorUrl(*state, url), name, ht, expectedHash, unpack, executable); - stopProgressBar(); + logger->pause(); if (!printPath) printInfo("path is '%s'", store->printStorePath(storePath)); |