Skip to content

Commit 493dbe2

Browse files
authored
Escape the '\' between " in the scalac task (#21613)
Closes #21610
2 parents 86a51ed + 7aa4ac9 commit 493dbe2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

project/Build.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,8 @@ object Build {
889889
extraClasspath ++= Seq(dottyCompiler, dottyInterfaces, asm, dottyStaging, dottyTastyInspector, tastyCore, compilerInterface)
890890
}
891891

892-
val wrappedArgs = (if (printTasty) args else insertClasspathInArgs(args, extraClasspath.mkString(File.pathSeparator))).map(arg => "\""+ arg + "\"")
893-
val fullArgs = main :: defaultOutputDirectory ::: wrappedArgs
892+
val wrappedArgs = if (printTasty) args else insertClasspathInArgs(args, extraClasspath.mkString(File.pathSeparator))
893+
val fullArgs = main :: (defaultOutputDirectory ::: wrappedArgs).map("\""+ _ + "\"").map(_.replace("\\", "\\\\"))
894894

895895
(Compile / runMain).toTask(fullArgs.mkString(" ", " ", ""))
896896
}.evaluated,

0 commit comments

Comments
 (0)