Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
scabug opened this issue Mar 24, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Mar 24, 2013

=== 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 #5062 (Fix for #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:{code} set _LINE_TOOLCP=%2%{code}

should be delayed evaluated: {code}set _LINE_TOOLCP=!2{code}

this was already the case at {code}!SCALA_HOME!{code}.

@scabug
Copy link
Author

@scabug scabug commented Mar 24, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7295?orig=1
Reporter: Frans W. van den Berg (vdenberg)
See #7293
Attachments:

@scabug scabug closed this Oct 23, 2013
@scabug scabug added the repl label Apr 7, 2017
@scabug scabug added this to the 2.11.0-M7 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants