[
https://issues.apache.org/jira/browse/CLI-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16767467#comment-16767467
]
Josh Elser commented on CLI-254:
--------------------------------
I think we're seeing this over in PHOENIX-3710. FWIW, it seems like using
{{--name='"value"'}} (instead of {{–name '"value"'}}) will actually get the
double-quotes around {{value}} preserved correctly.
> "test" gets parsed as test, quotes die :-(
> ------------------------------------------
>
> Key: CLI-254
> URL: https://issues.apache.org/jira/browse/CLI-254
> Project: Commons CLI
> Issue Type: Bug
> Affects Versions: 1.3
> Reporter: Alexander Petrossian (PAF)
> Priority: Major
>
> {code}
> def cli = new CliBuilder()
> cli.with {
> f longOpt:'json-filter','jq expression', args: 1
> }
> def vals = ['test', 't"es"t',
> "'test", "test'", "'test'",
> '"test', 'test"', '"test"']
> vals.each {
> def opt = cli.parse(['-f', it])
> assert opt.f == it
> }
> {code}
> It fails on last entry: "test".
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)