Print command line arguments only if --verbose option is given

This commit is contained in:
chubtub 2024-01-25 12:44:03 -05:00
parent 0ffb931112
commit 81575ee08a
2 changed files with 7 additions and 5 deletions

View File

@ -36,7 +36,9 @@ public class Main {
} else {
if (!commander.getVerifyFile().isEmpty()) {
validator = new ReferenceManifestValidator();
System.out.println(commander.toString());
if (commander.isVerbose()) {
System.out.println(commander.toString());
}
String verifyFile = commander.getVerifyFile();
String rimel = commander.getRimEventLog();
String certificateFile = commander.getPublicCertificate();
@ -60,7 +62,9 @@ public class Main {
}
} else {
gateway = new SwidTagGateway();
System.out.println(commander.toString());
if (commander.isVerbose()) {
System.out.println(commander.toString());
}
String createType = commander.getCreateType().toUpperCase();
String attributesFile = commander.getAttributesFile();
String jksTruststoreFile = commander.getTruststoreFile();

View File

@ -32,9 +32,6 @@ public class Commander {
private String outFile = "";
@Parameter(names = {"--verbose"}, description = "Control output verbosity.")
private boolean verbose = false;
@Parameter(names = {"-v", "--verify <path>"}, order = 3,
description = "Specify a RIM file to verify.")
private String verifyFile = "";
@Parameter(names = {"-t", "--truststore <path>"}, order = 4,
description = "The truststore to sign the base RIM created "
+ "or to validate the signed base RIM.")
@ -76,6 +73,7 @@ public class Commander {
public boolean isVersion() {
return version;
}
public boolean isVerbose() { return verbose; }
public String getAttributesFile() {
return attributesFile;
}