1
0
Fork 0
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:
Paul Schaub 2022-01-09 02:04:12 +01:00
parent 1c2cbf0e75
commit 1aca7112d2
12 changed files with 127 additions and 10 deletions

View file

@ -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);
}