diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc index 2c2bb54c5..4db49f02c 100644 --- a/src/libmain/progress-bar.cc +++ b/src/libmain/progress-bar.cc @@ -560,9 +560,4 @@ std::unique_ptr makeProgressBar() return std::make_unique(isTTY()); } -void startProgressBar() -{ - logger = makeProgressBar(); -} - } diff --git a/src/libmain/progress-bar.hh b/src/libmain/progress-bar.hh index 3420bb3f5..fc1b0fe78 100644 --- a/src/libmain/progress-bar.hh +++ b/src/libmain/progress-bar.hh @@ -7,6 +7,4 @@ namespace nix { std::unique_ptr makeProgressBar(); -void startProgressBar(); - } diff --git a/src/nix/prefetch.cc b/src/nix/prefetch.cc index 5fd559fb6..ba2fd39d8 100644 --- a/src/nix/prefetch.cc +++ b/src/nix/prefetch.cc @@ -4,7 +4,7 @@ #include "store-api.hh" #include "filetransfer.hh" #include "finally.hh" -#include "progress-bar.hh" +#include "loggers.hh" #include "tarfile.hh" #include "attr-path.hh" #include "eval-inline.hh" @@ -190,10 +190,7 @@ static int main_nix_prefetch_url(int argc, char * * argv) if (args.size() > 2) throw UsageError("too many arguments"); - Finally f([]() { logger->stop(); }); - - if (isTTY()) - startProgressBar(); + setLogFormat("bar"); auto store = openStore(); auto state = std::make_unique(myArgs.lookupPath, store, fetchSettings, evalSettings);