Merge pull request #5540 from samueldr/fix/key-subcommand

nix key: Fix error message and don't require flakes
This commit is contained in:
Eelco Dolstra 2021-11-12 10:38:00 +01:00 committed by GitHub
commit 44aed58538
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,8 +218,7 @@ struct CmdKey : NixMultiCommand
void run() override
{
if (!command)
throw UsageError("'nix flake' requires a sub-command.");
settings.requireExperimentalFeature(Xp::Flakes);
throw UsageError("'nix key' requires a sub-command.");
command->second->prepare();
command->second->run();
}