File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -619,13 +619,12 @@ object Build {
619619
620620 def dotDynTask (main : String ) = Def .inputTaskDyn {
621621 val dottyLib = packageAll.value(" dotty-library" )
622- val args : Seq [String ] = spaceDelimited(" <arg>" ).parsed
622+ val args : List [String ] = spaceDelimited(" <arg>" ).parsed.toList
623623
624- val fullArgs = main +: {
625- args.span(_ != " -classpath" ) match {
626- case (beforeCp, " -classpath" :: cp :: rest) => beforeCp ++ List (" -classpath" , cp + " :" + dottyLib) ++ rest
627- case (beforeCp, _) => beforeCp ++ List (" -classpath" , dottyLib)
628- }
624+ val fullArgs = main :: {
625+ val (beforeCp, fromCp) = args.span(_ != " -classpath" )
626+ val classpath = fromCp.drop(1 ).headOption.fold(dottyLib)(_ + " :" + dottyLib)
627+ beforeCp ::: " -classpath" :: classpath :: fromCp.drop(2 )
629628 }
630629
631630 (runMain in Compile ).toTask(fullArgs.mkString(" " , " " , " " ))
You can’t perform that action at this time.
0 commit comments