aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-11-14 14:04:09 +0100
committerEelco Dolstra <edolstra@gmail.com>2017-11-14 14:04:09 +0100
commit5ef5d70b5e3dec6abf72b22e531f527fff82b375 (patch)
tree2d7250e0cfe033b7cba4bdbb9b46a5785e591153
parentc9c3fc710ba6995b20e078523aa616323dc5759a (diff)
Make config options available to legacy commands
-rw-r--r--src/libmain/common-args.cc4
-rw-r--r--src/nix/main.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc
index ea27aaa35..d3aac6aba 100644
--- a/src/libmain/common-args.cc
+++ b/src/libmain/common-args.cc
@@ -34,6 +34,10 @@ MixCommonArgs::MixCommonArgs(const string & programName)
warn(e.what());
}
});
+
+ std::string cat = "config";
+ settings.convertToArgs(*this, cat);
+ hiddenCategories.insert(cat);
}
}
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 060402cd0..06bb8a1c3 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -43,10 +43,6 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
.longName("version")
.description("show version information")
.handler([&]() { printVersion(programName); });
-
- std::string cat = "config";
- settings.convertToArgs(*this, cat);
- hiddenCategories.insert(cat);
}
void printFlags(std::ostream & out) override