mirror of https://github.com/sbt/sbt.git
Merge pull request #8440 from MkDev11/fix/windows-debug-options-8100
[2.x] Fix debug options breaking launcher on Windows
This commit is contained in:
commit
948f12cf54
|
|
@ -208,6 +208,17 @@ object SbtScriptTest extends SimpleTestSuite with PowerAssertions {
|
|||
)
|
||||
}
|
||||
|
||||
// Regression test for https://github.com/sbt/sbt/issues/8100
|
||||
// Debug agent output in SBT_OPTS should not break the launcher on Windows
|
||||
makeTest(
|
||||
"sbt with debug agent in SBT_OPTS",
|
||||
sbtOpts = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=12346"
|
||||
)("-v") { out: List[String] =>
|
||||
assert(
|
||||
out.contains[String]("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=12346")
|
||||
)
|
||||
}
|
||||
|
||||
makeTest("sbt --no-share adds three system properties")("--no-share") { out: List[String] =>
|
||||
assert(out.contains[String]("-Dsbt.global.base=project/.sbtboot"))
|
||||
assert(out.contains[String]("-Dsbt.boot.directory=project/.boot"))
|
||||
|
|
|
|||
|
|
@ -980,7 +980,9 @@ exit /B 1
|
|||
:copyrt
|
||||
if /I !JAVA_VERSION! GEQ 9 (
|
||||
"!_JAVACMD!" !_JAVA_OPTS! !_SBT_OPTS! -jar "!sbt_jar!" --rt-ext-dir > "%TEMP%.\rtext.txt"
|
||||
set /p java9_ext= < "%TEMP%.\rtext.txt"
|
||||
rem Filter for the line containing java9-rt-ext- to avoid picking up debug agent output
|
||||
set "java9_ext="
|
||||
for /f "tokens=*" %%a in ('findstr /c:"java9-rt-ext-" "%TEMP%.\rtext.txt"') do set "java9_ext=%%a"
|
||||
set "java9_rt=!java9_ext!\rt.jar"
|
||||
|
||||
if not exist "!java9_rt!" (
|
||||
|
|
|
|||
Loading…
Reference in New Issue