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 1. #7293

Closed
scabug opened this issue Mar 24, 2013 · 3 comments

Comments

@scabug
Copy link

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? ===

Apps\scala-2.10.0\bin\HelloWorld.cmd""=="-toolcp" 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 17:{code} if "%1%"=="-toolcp" ({code}

should be {code}if [%1]==[-toolcp] ({code}

this was already the case at line 27.

@scabug
Copy link
Author

scabug commented Mar 24, 2013

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

@scabug
Copy link
Author

scabug commented Oct 21, 2013

@retronym said:
Frans,

I had to rework your proposed fix a little.

I would appreciate your review here: scala/scala#3065

@scabug
Copy link
Author

scabug commented Oct 21, 2013

@retronym said (edited on Oct 21, 2013 7:40:57 AM UTC):
Duplicate of #7295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants