Skip to content

Commit aa98bac

Browse files
committed
Include dottyLib when custom -classpath is added
1 parent e1365d9 commit aa98bac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

project/Build.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ object Build {
518518
val args: Seq[String] = spaceDelimited("<arg>").parsed
519519

520520
val fullArgs = args.span(_ != "-classpath") match {
521-
case (beforeCp, Nil) => beforeCp ++ ("-classpath" :: dottyLib :: Nil)
522-
case (beforeCp, rest) => beforeCp ++ rest
521+
case (beforeCp, "-classpath" :: cp :: rest) => beforeCp ++ List("-classpath", cp + ":" + dottyLib) ++ rest
522+
case (beforeCp, _) => beforeCp ++ ("-classpath" :: dottyLib :: Nil)
523523
}
524524

525525
(runMain in Compile).toTask(
@@ -533,8 +533,8 @@ object Build {
533533
val args: Seq[String] = spaceDelimited("<arg>").parsed
534534

535535
val fullArgs = args.span(_ != "-classpath") match {
536-
case (beforeCp, Nil) => beforeCp ++ ("-classpath" :: dottyLib :: Nil)
537-
case (beforeCp, rest) => beforeCp ++ rest
536+
case (beforeCp, "-classpath" :: cp :: rest) => beforeCp ++ List("-classpath", cp + ":" + dottyLib) ++ rest
537+
case (beforeCp, _) => beforeCp ++ ("-classpath" :: dottyLib :: Nil)
538538
}
539539

540540
(runMain in Compile).toTask(

0 commit comments

Comments
 (0)