fix manual defaults

This commit is contained in:
Patrick Jackson 2022-10-18 15:09:17 -07:00
parent 3093bd3a85
commit 11b5cf9561

View file

@ -369,6 +369,13 @@ void mainWrapped(int argc, char * * argv)
&& args.command->first != "upgrade-nix") && args.command->first != "upgrade-nix")
settings.requireExperimentalFeature(Xp::NixCommand); 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()) { if (args.useNet && !haveInternet()) {
warn("you don't have Internet access; disabling some network-dependent features"); warn("you don't have Internet access; disabling some network-dependent features");
args.useNet = false; args.useNet = false;