aboutsummaryrefslogtreecommitdiff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-06-11 14:06:35 -0600
committerBen Burdette <bburdette@gmail.com>2020-06-11 14:06:35 -0600
commitef1b3f21b6e51007d82e8e894dd9ecec0d1c5207 (patch)
tree28ec34c71e98779d0b655a0b8e9070b981ee0cd9 /src/nix/main.cc
parent94c347577ecea5dcd10a31ebfadf94db6ca5ab0d (diff)
parentac4d43a31bb32c1205b44d69e87606b7f54922a1 (diff)
Merge remote-tracking branch 'upstream/master' into errors-phase-2
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 ef301580a..203901168 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 = lvlWarn;
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;