Skip to content

Commit 0762f87

Browse files
committed
Fix scala wrapper test utils to use the whole Java command when testing JVM launchers
1 parent bb69fcf commit 0762f87

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

modules/integration/src/test/scala/scala/cli/integration/CoursierScalaInstallationTestHelper.scala

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,9 @@ trait CoursierScalaInstallationTestHelper {
6060
val scalaScript = execLine match { case scriptPathRegex(extractedPath) => extractedPath }
6161
val scalaScriptPath = os.Path(scalaScript)
6262
val lineToChange = "eval \"${SCALA_CLI_CMD_BASH[@]}\" \\"
63-
// FIXME: the way the scala script calls the launcher currently ignores the --debug flag
64-
val newContent = os.read(scalaScriptPath).replace(
65-
lineToChange,
66-
s"""SCALA_CLI_CMD_BASH=(\"\\\"${TestUtil.cliPath}\\\"\")
67-
|$lineToChange""".stripMargin
68-
)
63+
val changedLine =
64+
s"""eval \"${TestUtil.cli.mkString(s"\" \\${System.lineSeparator()}")}\" \\"""
65+
val newContent = os.read(scalaScriptPath).replace(lineToChange, changedLine)
6966
os.write.over(scalaScriptPath, newContent)
7067
scalaBinary -> scalaScriptPath
7168
}

0 commit comments

Comments
 (0)