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:
parent
1c2cbf0e75
commit
1aca7112d2
12 changed files with 127 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue