[ 
https://issues.apache.org/jira/browse/GROOVY-8578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Remko Popma updated GROOVY-8578:
--------------------------------
    Description: 
The picocli version of CliBuilder has an {{errorWriter}} property 
({{System.err}} by default) that is used to print the error message and usage 
help to when the user provided invalid input on the command line. This prevents 
error messages from inadvertently being parsed by another program when the 
output of a groovy program is piped to another program.

The previously existing {{writer}} property is used when the user requests help 
with {{--help}} or {{--version}}. This allows users to pipe the output of the 
help request to {{less}} or {{grep}} or another utility.

I think this improvement also makes sense for the commons-cli version of 
CliBuilder. I can raise a PR if there is interest.

  was:
The picocli version of CliBuilder has an {{errorWriter}} property 
({{System.err}} by default) that is used to print the error message and usage 
help to when the user provided invalid input on the command line.

The previously existing {{writer}} property is used when the user requests help 
with {{\--help}} or {{\--version}}.

I think this improvement also makes sense for the commons-cli version of 
CliBuilder. I can raise a PR if there is interest.


> Add errorWriter property to commons-cli CliBuilder
> --------------------------------------------------
>
>                 Key: GROOVY-8578
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8578
>             Project: Groovy
>          Issue Type: Task
>          Components: command line processing
>            Reporter: Remko Popma
>            Priority: Major
>             Fix For: 2.5.0-rc-3
>
>
> The picocli version of CliBuilder has an {{errorWriter}} property 
> ({{System.err}} by default) that is used to print the error message and usage 
> help to when the user provided invalid input on the command line. This 
> prevents error messages from inadvertently being parsed by another program 
> when the output of a groovy program is piped to another program.
> The previously existing {{writer}} property is used when the user requests 
> help with {{--help}} or {{--version}}. This allows users to pipe the output 
> of the help request to {{less}} or {{grep}} or another utility.
> I think this improvement also makes sense for the commons-cli version of 
> CliBuilder. I can raise a PR if there is interest.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to