diff --git a/project/Build.scala b/project/Build.scala index 4f90566a60f9..05eb164f91f3 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -844,7 +844,8 @@ object Build { extraClasspath ++= Seq(dottyCompiler, dottyInterfaces, asm, dottyStaging, dottyTastyInspector, tastyCore, compilerInterface) } - val fullArgs = main :: defaultOutputDirectory ::: (if (printTasty) args else insertClasspathInArgs(args, extraClasspath.mkString(File.pathSeparator))) + val wrappedArgs = (if (printTasty) args else insertClasspathInArgs(args, extraClasspath.mkString(File.pathSeparator))).map(arg => "\""+ arg + "\"") + val fullArgs = main :: defaultOutputDirectory ::: wrappedArgs (Compile / runMain).toTask(fullArgs.mkString(" ", " ", "")) }.evaluated,