Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-7295

Windows batch file containing a scala program, an error is reported since SI-5062 update. 2

    Details

      Description

      === What steps will reproduce the problem ===

      SCALA_HOME=C:\JVM Apps\scala-2.10.0\bin\

      If you create a windows batch file containing a scala program, an error is reported.

      Create, for instance, a batch file HelloWorld.cmd that contains a scala program that also prints the arguments:

      ::#!
      @echo off
      call scala %0 %*
      goto :eof
      ::!#
      println("Hello, world!")
      argv.toList foreach println
      

      Start the batch file in Windows PowerShell
      .\HelloWorld.cmd "foo(bar)baz"

      === What is the expected behavior? ===

      Output:

      "Hello, world!"
      foo(bar)baz
      

      === What do you see instead? ===

      baz was unexpected at this time.

      === Additional information ===

      Since to implementation of SI-5062 (Fix for SI-5062 -toolcp should be available on windows, in the scala.bat) a this problem is induced.

      === What versions of the following are you using? ===

      • Scala: 2.10.0
      • Java: 1.7.0_09
      • Operating system: Windows 7 x64

      In /src/compiler/scala/tools/ant/templates/tool-windows.tmpl

      line 18:

       set _LINE_TOOLCP=%2%

      should be delayed evaluated:

      set _LINE_TOOLCP=!2

      this was already the case at

      !SCALA_HOME!

      .

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                retronym Jason Zaugg
                Reporter:
                vdenberg Frans W. van den Berg
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: