1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-14 12:49: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

@ -51,6 +51,10 @@ public class EncryptCmd implements Runnable {
@Override
public void run() {
Encrypt encrypt = SopCLI.getSop().encrypt();
if (encrypt == null) {
throw new SOPGPException.UnsupportedSubcommand("Command 'encrypt' not implemented.");
}
if (type != null) {
try {
encrypt.mode(type);