summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-11-13 11:48:04 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-11-13 11:48:04 -0800
commitf64135b6b7f64faf42333d2997acee635c083d9f (patch)
treed52b30db81e5340e899bd60ccfdc822d40731096
parent11abe19c0cf873c305db0b13456b06cb98a964ed (diff)
parent25bcba59ce37bdb19ec784edaecfd033eef27037 (diff)
downloadscala-f64135b6b7f64faf42333d2997acee635c083d9f.tar.gz
scala-f64135b6b7f64faf42333d2997acee635c083d9f.tar.bz2
scala-f64135b6b7f64faf42333d2997acee635c083d9f.zip
Merge commit '25bcba59ce' into merge-2.10
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-windows.tmpl17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
index 1288eb0b7c..8441f3af23 100644
--- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
@@ -12,15 +12,18 @@ setlocal enableextensions enabledelayedexpansion
set _LINE_TOOLCP=
-:another_param
-
rem Use "%~1" to handle spaces in paths. See http://ss64.com/nt/syntax-args.html
-if "%~1"=="-toolcp" (
- set _LINE_TOOLCP=%~2
- shift
- shift
- goto another_param
+rem SI-7295 The goto here is needed to avoid problems with `scala Script.cmd "arg(with)paren"`,
+rem we must not evaluate %~2 eagerly, but delayed expansion doesn't seem to allow
+rem removal of quotation marks.
+if not [%~1]==[-toolcp] (
+ goto :notoolcp
)
+shift
+set _LINE_TOOLCP=%~1
+shift
+
+:notoolcp
rem We keep in _JAVA_PARAMS all -J-prefixed and -D-prefixed arguments
set _JAVA_PARAMS=