aboutsummaryrefslogtreecommitdiff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r--src/nix/main.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index fa0bb5b51..2af28ed3e 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({
@@ -110,6 +111,8 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
.description = "consider all previously downloaded files out-of-date",
.handler = {[&]() { refresh = true; }},
});
+
+ deprecatedAliases.insert({"dev-shell", "develop"});
}
void printFlags(std::ostream & out) override
@@ -163,6 +166,10 @@ void mainWrapped(int argc, char * * argv)
verbosity = Verbosity::Warn;
settings.verboseBuild = false;
+ setLogFormat("bar");
+
+ Finally f([] { logger->stop(); });
+
NixArgs args;
args.parseCmdline(argvToStrings(argc, argv));
@@ -176,10 +183,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;