File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/main/java/org/codejive/jpm Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,8 @@ static class Sync implements Callable<Integer> {
9090
9191 @ Option (
9292 names = {"-m" , "--max" },
93- description = "Maximum number of results to return" ,
94- defaultValue = "20" )
95- private int max ;
93+ description = "Maximum number of results to return" )
94+ private Integer max ;
9695
9796 @ Parameters (
9897 paramLabel = "artifactPattern" ,
@@ -103,6 +102,9 @@ static class Sync implements Callable<Integer> {
103102 @ Override
104103 public Integer call () throws Exception {
105104 if (interactive || artifactPattern == null || artifactPattern .isEmpty ()) {
105+ if (max == null ) {
106+ max = 100 ;
107+ }
106108 try (Terminal terminal = TerminalBuilder .builder ().build ()) {
107109 while (true ) {
108110 ConsolePrompt prompt = new ConsolePrompt (terminal );
@@ -151,6 +153,9 @@ public Integer call() throws Exception {
151153 }
152154 }
153155 } else {
156+ if (max == null ) {
157+ max = 20 ;
158+ }
154159 String [] artifactNames = search (artifactPattern );
155160 if (artifactNames .length > 0 ) {
156161 Arrays .stream (artifactNames ).forEach (System .out ::println );
You can’t perform that action at this time.
0 commit comments