diff options
author | Patrick Jackson <patrick@jackson.dev> | 2022-10-18 15:09:17 -0700 |
---|---|---|
committer | Patrick Jackson <patrick@jackson.dev> | 2022-10-18 15:09:17 -0700 |
commit | 11b5cf95615ffb2a2475ac444f4fe103e471748f (patch) | |
tree | 4f97e9be864a1f35eb940f27dafb85ce9109e01c | |
parent | 3093bd3a855b8fa1f572fd5a33c1971adf5e3e08 (diff) |
fix manual defaults
-rw-r--r-- | src/nix/main.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc index d78312944..f008ea2b7 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -369,6 +369,13 @@ void mainWrapped(int argc, char * * argv) && args.command->first != "upgrade-nix") settings.requireExperimentalFeature(Xp::NixCommand); + if (args.command->first == "show-config") { + // show-config must run before any settings are modified so that it outputs the defaults + args.command->second->prepare(); + args.command->second->run(); + return; + } + if (args.useNet && !haveInternet()) { warn("you don't have Internet access; disabling some network-dependent features"); args.useNet = false; |