1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

Merge remote-tracking branch 'upstream/master' into errors-phase-2

This commit is contained in:
Ben Burdette 2020-05-15 07:00:36 -06:00
commit 92123c6c79
15 changed files with 94 additions and 57 deletions

View file

@ -130,7 +130,7 @@ bool Settings::isExperimentalFeatureEnabled(const std::string & name)
void Settings::requireExperimentalFeature(const std::string & name)
{
if (!isExperimentalFeatureEnabled(name))
throw Error("experimental Nix feature '%s' is disabled", name);
throw Error("experimental Nix feature '%1%' is disabled; use '--experimental-features %1%' to override", name);
}
bool Settings::isWSL1()

View file

@ -167,12 +167,15 @@ void mainWrapped(int argc, char * * argv)
args.parseCmdline(argvToStrings(argc, argv));
settings.requireExperimentalFeature("nix-command");
initPlugins();
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(); });
startProgressBar(args.printBuildLogs);