diff --git a/project/Build.scala b/project/Build.scala index c82cd636dd68..c365f6f9381e 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -742,7 +742,8 @@ object Build { extraClasspath ++= Seq(dottyCompiler, dottyInterfaces, asm, dottyStaging, dottyTastyInspector, tastyCore, compilerInterface) } - val fullArgs = main :: (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 :: wrappedArgs (Compile / runMain).toTask(fullArgs.mkString(" ", " ", "")) }.evaluated,