Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-750

Unbalanced quotes in command with escaped double quotation mark

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • maven-shared-utils-3.2.1
    • maven-shared-utils-3.3.3
    • None
    • None

    Description

      Due to MSHARED-749, the following test will error (due to an exception being thrown) in master maven:

      @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);
      }
      
      

      Results:

      org.apache.maven.shared.utils.cli.CommandLineException: unbalanced quotes in echo "let\"s go"

       

      Attachments

        Issue Links

          Activity

            People

              khmarbaise Karl Heinz Marbaise
              KathrynNewbould Kathryn Newbould
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: