mirror of
https://github.com/NixOS/nix.git
synced 2025-11-30 06:01:00 +01:00
nix store sign: Use required attribute
This commit is contained in:
parent
139df77440
commit
3bd2b76f6e
1 changed files with 1 additions and 3 deletions
|
|
@ -104,6 +104,7 @@ struct CmdSign : StorePathsCommand
|
||||||
.labels = {"file"},
|
.labels = {"file"},
|
||||||
.handler = {&secretKeyFile},
|
.handler = {&secretKeyFile},
|
||||||
.completer = completePath,
|
.completer = completePath,
|
||||||
|
.required = true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -114,9 +115,6 @@ struct CmdSign : StorePathsCommand
|
||||||
|
|
||||||
void run(ref<Store> store, StorePaths && storePaths) override
|
void run(ref<Store> store, StorePaths && storePaths) override
|
||||||
{
|
{
|
||||||
if (secretKeyFile.empty())
|
|
||||||
throw UsageError("you must specify a secret key file using '-k'");
|
|
||||||
|
|
||||||
SecretKey secretKey(readFile(secretKeyFile));
|
SecretKey secretKey(readFile(secretKeyFile));
|
||||||
LocalSigner signer(std::move(secretKey));
|
LocalSigner signer(std::move(secretKey));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue