Skip to content

Commit 84d2f7d

Browse files
committed
escape \ in Windows paths in test data string literals
1 parent 6ca7a33 commit 84d2f7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sbt-test/sbt-bridge/zinc-13-compat/build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ lazy val root = project.in(file("."))
4242
|object Scala3 {
4343
| val version = "$scala3Version"
4444
| val allJars = Array(
45-
| ${allJars.map(jar => s"""new File("${jar.getAbsolutePath}")""").mkString(",\n ")}
45+
| ${allJars.map(jar => s"""new File("${jar.getAbsolutePath.replace("\\", "\\\\")}")""").mkString(",\n ")}
4646
| )
4747
| val compilerJar = new File("$compilerJar")
4848
| val libraryJars = Array(
@@ -64,8 +64,8 @@ lazy val root = project.in(file("."))
6464
|import java.io.File
6565
|
6666
|object Input {
67-
| val outputFile = new File("${output.getAbsolutePath}")
68-
| val sources = Array(new File("${sourceFile.getAbsolutePath}"))
67+
| val outputFile = new File("${output.getAbsolutePath.replace("\\", "\\\\")}")
68+
| val sources = Array(new File("${sourceFile.getAbsolutePath.replace("\\", "\\\\")}"))
6969
|}
7070
|""".stripMargin
7171
)

0 commit comments

Comments
 (0)