mirror of
https://codeberg.org/PGPainless/wkd-java.git
synced 2025-09-09 03:09:39 +02:00
Experimental feature for testing WKDCli against wkd-test-suite
This commit is contained in:
parent
049c14b779
commit
cd3f36e26a
9 changed files with 159 additions and 11 deletions
|
@ -24,6 +24,19 @@ public class WKDCLI {
|
|||
|
||||
public static int execute(String[] args) {
|
||||
return new CommandLine(WKDCLI.class)
|
||||
.setExitCodeExceptionMapper(new CommandLine.IExitCodeExceptionMapper() {
|
||||
@Override
|
||||
public int getExitCode(Throwable exception) {
|
||||
if (exception instanceof MissingUserIdException) {
|
||||
return MissingUserIdException.ERROR_CODE;
|
||||
} else if (exception instanceof CertNotFetchableException) {
|
||||
return CertNotFetchableException.ERROR_CODE;
|
||||
}
|
||||
|
||||
// Others get mapped to 1
|
||||
return 1;
|
||||
}
|
||||
})
|
||||
.setCommandName("wkdcli")
|
||||
.execute(args);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue