diff options
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r-- | src/nix/main.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc index 936674354..2ad748289 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -10,6 +10,7 @@ #include "progress-bar.hh" #include "filetransfer.hh" #include "finally.hh" +#include "loggers.hh" #include <sys/types.h> #include <sys/socket.h> @@ -90,7 +91,7 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs .longName = "print-build-logs", .shortName = 'L', .description = "print full build logs on stderr", - .handler = {&printBuildLogs, true}, + .handler = {[&]() {setLogFormat(LogFormat::barWithLogs); }}, }); addFlag({ @@ -166,6 +167,10 @@ void mainWrapped(int argc, char * * argv) settings.verboseBuild = false; evalSettings.pureEval = true; + setLogFormat("bar"); + + Finally f([] { logger->stop(); }); + NixArgs args; Finally printCompletions([&]() @@ -194,10 +199,6 @@ void mainWrapped(int argc, char * * argv) && args.command->first != "upgrade-nix") settings.requireExperimentalFeature("nix-command"); - Finally f([]() { stopProgressBar(); }); - - startProgressBar(args.printBuildLogs); - if (args.useNet && !haveInternet()) { warn("you don't have Internet access; disabling some network-dependent features"); args.useNet = false; |