PRint help to adapter not directly to System.out
@@ -3,6 +3,7 @@ package com.quorum.tessera.config.cli;
import com.quorum.tessera.config.*;
import com.quorum.tessera.config.cli.parsers.ConfigurationParser;
import com.quorum.tessera.jaxrs.client.ClientFactory;
+import java.io.PrintWriter;
import java.net.URI;
import java.util.Arrays;
import java.util.List;
@@ -63,8 +64,12 @@ public class AdminCliAdapter implements CliAdapter {
if (argsList.contains("help") || argsList.isEmpty()) {
HelpFormatter formatter = new HelpFormatter();
- formatter.setWidth(200);
- formatter.printHelp("tessera admin", options);
+
+ formatter.printHelp(new PrintWriter(sys().out()),
+ 200, "tessera admin",
+ null, options, formatter.getLeftPadding(),
+ formatter.getDescPadding(), null, false);
+
return new CliResult(0, true, null);
}
