You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2018/07/29 10:49:00 UTC

[jira] [Closed] (MSHARED-750) Unbalanced quotes in command with escaped double quotation mark

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

Karl Heinz Marbaise closed MSHARED-750.
---------------------------------------
    Resolution: Done

> Unbalanced quotes in command with escaped double quotation mark
> ---------------------------------------------------------------
>
>                 Key: MSHARED-750
>                 URL: https://issues.apache.org/jira/browse/MSHARED-750
>             Project: Maven Shared Components
>          Issue Type: Bug
>            Reporter: Kathryn Newbould
>            Priority: Major
>
> Due to MSHARED-749, the following test will error (due to an exception being thrown) in master maven:
> {code:java}
> @Test
> public void givenAnEscapedDoubleQuoteMarkInArgument_whenPreparingToExecuteCode_thenTheQuotationMarkRemainsEscaped() throws Exception {
> final String command = "echo \"let\\\"s go\"";
> final String[] actual = CommandLineUtils.translateCommandline(command);
> final String[] expected = new String[]{"echo", "let\\\"s go"};
> assertArrayEquals(expected, actual);
> }
> {code}
> Results:
> {code:java}
> org.apache.maven.shared.utils.cli.CommandLineException: unbalanced quotes in echo "let\"s go"{code}
>  



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