[
https://issues.apache.org/jira/browse/GROOVY-5900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Sun reassigned GROOVY-5900:
----------------------------------
Fix Version/s: 7.0.0-alpha-1
Assignee: Daniel Sun
> 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)