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

groovy.bat doesn't execute scripts with spaces in their path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-1
    • 1.0-JSR-4
    • None
    • None
    • WIndows 2000

    Description

      If I try this on a Windows2000(IT) command prompt:

      groovy.bat "D:\Documents and Settings\Administrator\Desktop\paintingByNumbers.groovy"

      I get this message:

      and non atteso

      (translated to english: and not expected)

      I nailed down the problem to this line:

      if "x%1" == "x-cp" set CP=%2

      In fact when %1 is already double quoted and contains spaces the file batch interpreter gets confused. So It would be better to use another quoting character (e.g. the single quote) like this:

      if 'x%1' == 'x-cp' set CP=%2

      Don't know if this can introduce other problems, but it seems to work for me.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nicfagn Nicola Fagnani
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: