Skip to content

Commit 3bd2b76

Browse files
committed
nix store sign: Use required attribute
1 parent 139df77 commit 3bd2b76

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/nix/sigs.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ struct CmdSign : StorePathsCommand
104104
.labels = {"file"},
105105
.handler = {&secretKeyFile},
106106
.completer = completePath,
107+
.required = true,
107108
});
108109
}
109110

@@ -114,9 +115,6 @@ struct CmdSign : StorePathsCommand
114115

115116
void run(ref<Store> store, StorePaths && storePaths) override
116117
{
117-
if (secretKeyFile.empty())
118-
throw UsageError("you must specify a secret key file using '-k'");
119-
120118
SecretKey secretKey(readFile(secretKeyFile));
121119
LocalSigner signer(std::move(secretKey));
122120

0 commit comments

Comments
 (0)