Skip to content

Commit dbe71d6

Browse files
Merge pull request #3378 from dotty-staging/fix-sbt-dotty-run-classpath
Include dottyLib when custom -classpath is added
2 parents 431f0fc + 5b43c65 commit dbe71d6

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 ++ List("-classpath", dottyLib)
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 ++ List("-classpath", dottyLib)
538538
}
539539

540540
(runMain in Compile).toTask(

0 commit comments

Comments
 (0)