Skip to content

Commit ba68665

Browse files
committed
Fix #3496: Insert classpath before other arguments
Order expected by java
1 parent b95e71a commit ba68665

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ object Build {
635635
def insertClasspathInArgs(args: List[String], cp: String): List[String] = {
636636
val (beforeCp, fromCp) = args.span(_ != "-classpath")
637637
val classpath = fromCp.drop(1).headOption.fold(cp)(_ + ":" + cp)
638-
beforeCp ::: "-classpath" :: classpath :: fromCp.drop(2)
638+
"-classpath" :: classpath :: beforeCp ::: fromCp.drop(2)
639639
}
640640

641641
lazy val nonBootstrapedDottyCompilerSettings = commonDottyCompilerSettings ++ Seq(

project/scripts/sbtTests

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,12 @@ if grep -e "dotr test ok" sbtdotr2.out; then
2323
else
2424
exit -1
2525
fi
26+
echo "testing sbt dotr with no -classpath"
27+
pushd out/scriptedtest2/
28+
./project/scripts/sbt "dotr dotrtest.Test" > sbtdotr2-2.out
29+
if grep -e "dotr test ok" sbtdotr2-2.out; then
30+
echo "output ok"
31+
else
32+
exit -1
33+
fi
34+
pop

0 commit comments

Comments
 (0)