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 2018/05/19 15:21:00 UTC

[jira] [Commented] (GROOVY-8578) Add errorWriter property to commons-cli CliBuilder

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

Paul King commented on GROOVY-8578:
-----------------------------------

If it is a trivial change and low risk, please go ahead but I don't see it as critical.

> Add errorWriter property to commons-cli CliBuilder
> --------------------------------------------------
>
>                 Key: GROOVY-8578
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8578
>             Project: Groovy
>          Issue Type: Improvement
>          Components: command line processing
>            Reporter: Remko Popma
>            Priority: Major
>
> This ticket proposes to modify the commons-cli version of CliBuilder, so that it also has an {{errorWriter}} property that works similar to the picocli version of CliBuilder.
> h3. Description of Functionality
> 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.
> h3. Motivation
>  * This is a good feature in general (follow conventions for command line applications)
>  * It makes the commons-cli version and the picocli version of CliBuilder more consistent with each other.
> I can raise a PR if there is interest.



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