From 5ef5d70b5e3dec6abf72b22e531f527fff82b375 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Nov 2017 14:04:09 +0100 Subject: Make config options available to legacy commands --- src/libmain/common-args.cc | 4 ++++ src/nix/main.cc | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc index ea27aaa35e03..d3aac6aba1ff 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 060402cd08d5..06bb8a1c3043 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 -- cgit 1.4.1