nix: Don't require --experimental-features=nix-command for some subcommands

This commit is contained in:
Eelco Dolstra 2020-05-07 16:46:25 +02:00
parent 5722f9690c
commit 268ecf5b3f
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -167,12 +167,15 @@ void mainWrapped(int argc, char * * argv)
args.parseCmdline(argvToStrings(argc, argv)); args.parseCmdline(argvToStrings(argc, argv));
settings.requireExperimentalFeature("nix-command");
initPlugins(); initPlugins();
if (!args.command) args.showHelpAndExit(); if (!args.command) args.showHelpAndExit();
if (args.command->first != "repl"
&& args.command->first != "doctor"
&& args.command->first != "upgrade-nix")
settings.requireExperimentalFeature("nix-command");
Finally f([]() { stopProgressBar(); }); Finally f([]() { stopProgressBar(); });
startProgressBar(args.printBuildLogs); startProgressBar(args.printBuildLogs);