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> {
90
90
91
91
@ Option (
92
92
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 ;
96
95
97
96
@ Parameters (
98
97
paramLabel = "artifactPattern" ,
@@ -103,6 +102,9 @@ static class Sync implements Callable<Integer> {
103
102
@ Override
104
103
public Integer call () throws Exception {
105
104
if (interactive || artifactPattern == null || artifactPattern .isEmpty ()) {
105
+ if (max == null ) {
106
+ max = 100 ;
107
+ }
106
108
try (Terminal terminal = TerminalBuilder .builder ().build ()) {
107
109
while (true ) {
108
110
ConsolePrompt prompt = new ConsolePrompt (terminal );
@@ -151,6 +153,9 @@ public Integer call() throws Exception {
151
153
}
152
154
}
153
155
} else {
156
+ if (max == null ) {
157
+ max = 20 ;
158
+ }
154
159
String [] artifactNames = search (artifactPattern );
155
160
if (artifactNames .length > 0 ) {
156
161
Arrays .stream (artifactNames ).forEach (System .out ::println );
You can’t perform that action at this time.
0 commit comments