From abc929687e3ce43ec6d2998a51cdbb485e777d6c Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Thu, 19 Nov 2020 10:19:14 -0800 Subject: [PATCH] Remove leading -J from .sbtopts lines The windows batch script for sbt does not strip -J from lines in the .sbtopts file, which can cause sbt to fail to run since they end up getting passed in as unknown vm arguments. --- src/universal/bin/sbt.bat | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/universal/bin/sbt.bat b/src/universal/bin/sbt.bat index 41ce56f87..7640ea3d0 100755 --- a/src/universal/bin/sbt.bat +++ b/src/universal/bin/sbt.bat @@ -52,10 +52,13 @@ rem users can set SBT_OPTS via .sbtopts if exist .sbtopts for /F %%A in (.sbtopts) do ( set _sbtopts_line=%%A if not "!_sbtopts_line:~0,1!" == "#" ( + if "!_sbtopts_line:~0,2!" == "-J" ( + set _sbtopts_line=!_sbtopts_line:~2,1000! + ) if defined _SBT_OPTS ( - set _SBT_OPTS=!_SBT_OPTS! %%A + set _SBT_OPTS=!_SBT_OPTS! !_sbtopts_line! ) else ( - set _SBT_OPTS=%%A + set _SBT_OPTS=!_sbtopts_line! ) ) )