groovy
  1. groovy
  2. GROOVY-2690

groovy.bat faile to start script that are in a folder with a dash follow with "s"

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.5.5, 1.6-beta-1
    • Component/s: groovy-jdk
    • Labels:
      None
    • Environment:
      Windows
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      to reproduce the bug, do following on Windows XP prompt:

      mkdir test-super
      echo println(new Date()) > test-super\test.groovy
      groovy test-super\test.groovy

      I wil get this error:
      c:\opt\java_projects>groovy test-super\test.groovy
      Caught: java.io.IOException: Invalid argument

        Activity

        Hide
        blackdrag blackdrag added a comment -

        looks like a problem from commons cli to me... you could try this:

        groovy "test-super\test.groovy" 
        Show
        blackdrag blackdrag added a comment - looks like a problem from commons cli to me... you could try this: groovy "test- super \test.groovy"
        Hide
        Zemian Deng added a comment -

        Just tried and still get the same error:

        {code=none}
        C:\opt\java_projects>groovy "test-super\test.groovy"
        Caught: java.io.IOException: Invalid argument
        
        


        By adding echo in fron of java command in startGroovy.bat, it looks like the path got replaced by "*" ???{code=none}

        C:\opt\java_projects>groovy "test-super\test.groovy"
        "C:\Program Files\Java\jdk1.6.0_03\bin\java.exe" "-Xmx128m" -Dprogram.name="" -Dgroovy.home="C:\opt\groovy-1.5.4\bin\.."
        -Dtools.jar="C:\Program Files\Java\jdk1.6.0_03\lib\tools.jar" -Dgroovy.starter.conf="C:\opt\groovy-1.5.4\bin\..\conf\gr
        oovy-starter.conf" -Dscript.name="C:\opt\java_projects\test-super\test.groovy" -classpath "C:\opt\groovy-1.5.4\bin\..\li
        b\groovy-1.5.4.jar" org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain --conf "C:\opt\groovy-1.5.4\bin\
        ..\conf\groovy-starter.conf" --classpath "." "test*uper\test.groovy"

        
        
        Show
        Zemian Deng added a comment - Just tried and still get the same error: {code=none} C:\opt\java_projects>groovy "test-super\test.groovy" Caught: java.io.IOException: Invalid argument By adding echo in fron of java command in startGroovy.bat, it looks like the path got replaced by "*" ???{code=none} C:\opt\java_projects>groovy "test-super\test.groovy" "C:\Program Files\Java\jdk1.6.0_03\bin\java.exe" "-Xmx128m" -Dprogram.name="" -Dgroovy.home="C:\opt\groovy-1.5.4\bin\.." -Dtools.jar="C:\Program Files\Java\jdk1.6.0_03\lib\tools.jar" -Dgroovy.starter.conf="C:\opt\groovy-1.5.4\bin\..\conf\gr oovy-starter.conf" -Dscript.name="C:\opt\java_projects\test-super\test.groovy" -classpath "C:\opt\groovy-1.5.4\bin\..\li b\groovy-1.5.4.jar" org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain --conf "C:\opt\groovy-1.5.4\bin\ ..\conf\groovy-starter.conf" --classpath "." "test*uper\test.groovy"
        Hide
        Paul King added a comment -

        I have replicated this issue. The workaround on 1.5.4 is to use the native installer. If you type groovy.exe ...as before... you shouldn't have this problem. The windows installer provides a simple way to add the native installer.

        Show
        Paul King added a comment - I have replicated this issue. The workaround on 1.5.4 is to use the native installer. If you type groovy.exe ...as before... you shouldn't have this problem. The windows installer provides a simple way to add the native installer.
        Hide
        Paul King added a comment -

        Should be fixed in the next release. The temporary workaround if you wish to use 1.5.4 with the bat file is to swap the unescaping order around. On approx line 130, the -d unescaping has to come after all others (it was before -s previously).

        Show
        Paul King added a comment - Should be fixed in the next release. The temporary workaround if you wish to use 1.5.4 with the bat file is to swap the unescaping order around. On approx line 130, the -d unescaping has to come after all others (it was before -s previously).

          People

          • Assignee:
            Paul King
            Reporter:
            Zemian Deng
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: