mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-09 10:19:39 +02:00
SOP commands: Throw UnsupportedSubcommand error when sop.command() returns null
This commit is contained in:
parent
1c2cbf0e75
commit
1aca7112d2
12 changed files with 127 additions and 10 deletions
|
@ -31,6 +31,10 @@ public class GenerateKeyCmd implements Runnable {
|
|||
@Override
|
||||
public void run() {
|
||||
GenerateKey generateKey = SopCLI.getSop().generateKey();
|
||||
if (generateKey == null) {
|
||||
throw new SOPGPException.UnsupportedSubcommand("Command 'generate-key' not implemented.");
|
||||
}
|
||||
|
||||
for (String userId : userId) {
|
||||
generateKey.userId(userId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue