aboutsummaryrefslogtreecommitdiff
path: root/src/nix/sigs.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-06-18 16:27:35 +0200
committerGitHub <noreply@github.com>2019-06-18 16:27:35 +0200
commit5d8ec94d7fe4eded9f836bc49449d6eaff8fbc8f (patch)
tree45211b7ecd10f372c9a4a8e4b6cba7a30560ce21 /src/nix/sigs.cc
parenteb18aedccbc0d01b6a5cc720ce1befd0b316aebf (diff)
parenta0de58f471c9087d8e6cc60a6078f9940a125b15 (diff)
Merge pull request #2953 from NixOS/lazy-multi-command
Make subcommand construction in MultiCommand lazy
Diffstat (limited to 'src/nix/sigs.cc')
-rw-r--r--src/nix/sigs.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/nix/sigs.cc b/src/nix/sigs.cc
index b1825c412..23bc83ad0 100644
--- a/src/nix/sigs.cc
+++ b/src/nix/sigs.cc
@@ -22,11 +22,6 @@ struct CmdCopySigs : StorePathsCommand
.handler([&](std::vector<std::string> ss) { substituterUris.push_back(ss[0]); });
}
- std::string name() override
- {
- return "copy-sigs";
- }
-
std::string description() override
{
return "copy path signatures from substituters (like binary caches)";
@@ -93,7 +88,7 @@ struct CmdCopySigs : StorePathsCommand
}
};
-static RegisterCommand r1(make_ref<CmdCopySigs>());
+static auto r1 = registerCommand<CmdCopySigs>("copy-sigs");
struct CmdSignPaths : StorePathsCommand
{
@@ -109,11 +104,6 @@ struct CmdSignPaths : StorePathsCommand
.dest(&secretKeyFile);
}
- std::string name() override
- {
- return "sign-paths";
- }
-
std::string description() override
{
return "sign the specified paths";
@@ -146,4 +136,4 @@ struct CmdSignPaths : StorePathsCommand
}
};
-static RegisterCommand r3(make_ref<CmdSignPaths>());
+static auto r2 = registerCommand<CmdSignPaths>("sign-paths");