From 043e95e5c0b9c119acd2116acfe876396668e655 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Sat, 5 Nov 2022 18:06:35 +0100 Subject: [PATCH] Fix arity of arguments in verify commands Fixes https://github.com/pgpainless/pgpainless/issues/330 --- .../src/main/java/sop/cli/picocli/commands/InlineVerifyCmd.java | 2 +- .../src/main/java/sop/cli/picocli/commands/VerifyCmd.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sop-java-picocli/src/main/java/sop/cli/picocli/commands/InlineVerifyCmd.java b/sop-java-picocli/src/main/java/sop/cli/picocli/commands/InlineVerifyCmd.java index eb464ea..05e2c8a 100644 --- a/sop-java-picocli/src/main/java/sop/cli/picocli/commands/InlineVerifyCmd.java +++ b/sop-java-picocli/src/main/java/sop/cli/picocli/commands/InlineVerifyCmd.java @@ -23,7 +23,7 @@ import java.util.List; exitCodeOnInvalidInput = 37) public class InlineVerifyCmd extends AbstractSopCmd { - @CommandLine.Parameters(arity = "1..*", + @CommandLine.Parameters(arity = "0..*", paramLabel = "CERT") List certificates = new ArrayList<>(); diff --git a/sop-java-picocli/src/main/java/sop/cli/picocli/commands/VerifyCmd.java b/sop-java-picocli/src/main/java/sop/cli/picocli/commands/VerifyCmd.java index 8054e1f..1bcd0a3 100644 --- a/sop-java-picocli/src/main/java/sop/cli/picocli/commands/VerifyCmd.java +++ b/sop-java-picocli/src/main/java/sop/cli/picocli/commands/VerifyCmd.java @@ -25,7 +25,7 @@ public class VerifyCmd extends AbstractSopCmd { paramLabel = "SIGNATURE") String signature; - @CommandLine.Parameters(index = "0..*", + @CommandLine.Parameters(index = "1..*", arity = "1..*", paramLabel = "CERT") List certificates = new ArrayList<>();