Skip to content

Commit 3a00a89

Browse files
committed
fixed handling of jvm opts
1 parent eb49bd2 commit 3a00a89

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

dist/bin/dotc.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ rem Optimize for short-running applications, see https://github.com/lampepfl/dot
8888
rem break out -D and -J options and add them to JAVA_OPTS as well
8989
rem so they reach the JVM in time to do some good. The -D options
9090
rem will be available as system properties.
91-
) else if "%_ARG:~0,2%"=="-D" (
91+
) else if "%__ARG:~0,2%"=="-D" (
9292
call :addJava "%__ARG%"
9393
call :addScala "%__ARG%"
94-
) else if "%_ARG:~0,2%"=="-J" (
95-
call :addJava "%__ARG%"
94+
) else if "%__ARG:~0,2%"=="-J" (
95+
call :addJava "%__ARG:~2%"
9696
call :addScala "%__ARG%"
9797
) else (
9898
call :addResidual "%__ARG%"

dist/bin/dotr.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ rem elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then
4545
if %_WITH_COMPILER%==1 (
4646
set _CP_ARG=!_CP_ARG!%_PSEP%%_DOTTY_COMP%%_PSEP%%_DOTTY_INTF%%_PSEP%%_SCALA_ASM%
4747
)
48-
set _JAVA_ARGS=%_JAVA_DEBUG% -classpath "!_CP_ARG!" %_RESIDUAL_ARGS%
48+
set _JAVA_ARGS=%_JAVA_DEBUG% -classpath "!_CP_ARG!" %_JVM_OPTIONS% %_RESIDUAL_ARGS%
4949
%_JAVACMD% !_JAVA_ARGS!
5050
) else (
5151
echo Warning: Command option is not correct. 1>&2
@@ -82,8 +82,8 @@ if /i "%__ARG%"=="-repl" (
8282
set _WITH_COMPILER=1
8383
) else if /i "%__ARG%"=="-d" (
8484
set _JAVA_DEBUG=%_DEBUG_STR%
85-
) else if /i "%_ARG:~0,2%"=="-J" (
86-
set _JVM_OPTIONS=!_JVM_OPTIONS! %__ARG%
85+
) else if /i "%__ARG:~0,2%"=="-J" (
86+
set _JVM_OPTIONS=!_JVM_OPTIONS! %__ARG:~2%
8787
set _JAVA_OPTIONS=!_JAVA_OPTIONS! %__ARG%
8888
) else (
8989
set _RESIDUAL_ARGS=%_RESIDUAL_ARGS% %__ARG%

0 commit comments

Comments
 (0)