about summary refs log tree commit diff
path: root/third_party/nix
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix')
-rw-r--r--third_party/nix/src/libmain/common-args.cc14
-rw-r--r--third_party/nix/src/nix-build/nix-build.cc2
2 files changed, 14 insertions, 2 deletions
diff --git a/third_party/nix/src/libmain/common-args.cc b/third_party/nix/src/libmain/common-args.cc
index 0000605d454a..729e026f1990 100644
--- a/third_party/nix/src/libmain/common-args.cc
+++ b/third_party/nix/src/libmain/common-args.cc
@@ -9,6 +9,20 @@ namespace nix {
 MixCommonArgs::MixCommonArgs(const std::string& programName)
     : programName(programName) {
   mkFlag()
+      .longName("verbose")
+      .shortName('v')
+      .description("increase verbosity level")
+      .handler([]() {
+        FLAGS_stderrthreshold = google::GLOG_INFO;
+        FLAGS_v += 1;
+      });
+
+  mkFlag()
+      .longName("quiet")
+      .description("silence all log output")
+      .handler([]() { FLAGS_stderrthreshold = google::GLOG_FATAL; });
+
+  mkFlag()
       .longName("option")
       .labels({"name", "value"})
       .description("set a Nix configuration option (overriding nix.conf)")
diff --git a/third_party/nix/src/nix-build/nix-build.cc b/third_party/nix/src/nix-build/nix-build.cc
index c5a34a8475a3..26c308967724 100644
--- a/third_party/nix/src/nix-build/nix-build.cc
+++ b/third_party/nix/src/nix-build/nix-build.cc
@@ -242,8 +242,6 @@ static void _main(int argc, char** argv) {
         else if (*arg == "--keep") {
           keepVars.insert(getArg(*arg, arg, end));
 
-        } else if (*arg == "--quiet") {
-          FLAGS_stderrthreshold = google::GLOG_FATAL;
         } else if (*arg == "-") {
           readStdin = true;