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

Daniel Sun commented on GROOVY-5900:
------------------------------------

Fixed on master; added a regression test in 
3cf3f4d8c2362addeebbf31e061bbacdc4e190bc 
(https://github.com/apache/groovy/commit/3cf3f4d8c2362addeebbf31e061bbacdc4e190bc).

> 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
>            Assignee: Daniel Sun
>            Priority: Minor
>             Fix For: 7.0.0-alpha-1
>
>         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
(v10.3.26#10030026)

Reply via email to