You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2015/06/07 11:50:00 UTC

[jira] [Commented] (GROOVY-5900) Command line parameter of "--" does not get passed as an arguement

    [ https://issues.apache.org/jira/browse/GROOVY-5900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14576170#comment-14576170 ] 

Paul King commented on GROOVY-5900:
-----------------------------------

We have moved to Commons CLI 1.3 and it has the same behavior as 1.2 in this regard.

> Command line parameter of "--" does not get passed as an arguement
> ------------------------------------------------------------------
>
>                 Key: GROOVY-5900
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5900
>             Project: Groovy
>          Issue Type: Bug
>          Components: command line processing
>    Affects Versions: 1.8.4
>         Environment: mac osx
>            Reporter: bruce weertman
>            Priority: Minor
>         Attachments: test.groovy
>
>
> I apologize if this has already been fixed and/or if I've posted to the wrong
> component.
> If "--" is an argument to a groovy script, it will not be seen by 
> the groovy program.
> For example:
> $ cat test.groovy
> #!/usr/bin/env groovy
> println "The args are: ${args}"
> $ ./test.groovy foo bar
> The args are: [foo, bar]
> $ ./test.groovy 
> The args are: []
> $ ./test.groovy -
> The args are: [-]
> $ ./test.groovy --
> The args are: []
> $ ./test.groovy ---
> The args are: [---]
> Believe it or not, I actually have need for this! 
> -- is a common field value in our ancient, but heavily used data system



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)