Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5113

Windows -e option fails when reserved characters are used in the script

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.7.8, 1.8.3
    • None
    • None

    Description

      bin\groovy -e "System.properties.each{ k,v -> println(k + ': ' + v) }"

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      script_from_command_line: 1: unexpected token: k @ line 1, column 25.
         System.properties.each{ k,v - + ': ' + v) }
      

      Caused by the > character not being properly escaped somehow.

      Attachments

        Activity

          People

            Unassigned Unassigned
            robelsner Rob Elsner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: