You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2023/11/06 00:20:50 UTC

(groovy) branch GROOVY_4_0_X updated: GROOVY-11210: Bump Commons CLI to 1.6.0

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
     new 250690190f GROOVY-11210: Bump Commons CLI to 1.6.0
250690190f is described below

commit 250690190fc4cfc5cbf3d7520436428c938fe4af
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Oct 30 18:29:36 2023 +1000

    GROOVY-11210: Bump Commons CLI to 1.6.0
---
 .../src/main/groovy/groovy/cli/commons/CliBuilder.groovy            | 6 +++---
 versions.properties                                                 | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/subprojects/groovy-cli-commons/src/main/groovy/groovy/cli/commons/CliBuilder.groovy b/subprojects/groovy-cli-commons/src/main/groovy/groovy/cli/commons/CliBuilder.groovy
index 864b0aa380..4f9cba80ef 100644
--- a/subprojects/groovy-cli-commons/src/main/groovy/groovy/cli/commons/CliBuilder.groovy
+++ b/subprojects/groovy-cli-commons/src/main/groovy/groovy/cli/commons/CliBuilder.groovy
@@ -471,13 +471,13 @@ class CliBuilder {
                 // special flag: treat like normal not boolean expecting explicit 'true' or 'false' param
                 isFlag = false
             }
+            if (type.isArray()) {
+                builder.optionalArg(optionalArg)
+            }
             if (!isFlag) {
                 builder.hasArg(true)
                 if (details.containsKey('args')) builder.numberOfArgs(details.args)
             }
-            if (type.isArray()) {
-                builder.optionalArg(optionalArg)
-            }
         }
         def typedOption = create(builder.build(), convert ? null : type, defaultValue, convert)
         typedOption
diff --git a/versions.properties b/versions.properties
index ea24b9d335..875365607c 100644
--- a/versions.properties
+++ b/versions.properties
@@ -23,7 +23,7 @@ antlr4=4.11.1.4
 bridger=1.6.Final
 codenarc=3.3.0-groovy-4.0
 cobertura=1.9.4.1
-commonsCli=1.5.0
+commonsCli=1.6.0
 commonsMath3=3.6.1
 gpars=1.2.1
 ivy=2.5.2