diff --git a/project/Build.scala b/project/Build.scala index 0f36d477649a..ed0e7fe8f537 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -838,7 +838,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,