File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -199,11 +199,13 @@ object MainGenericRunner {
199
199
Option .when(Jar .isJarOrZip(dotty.tools.io.Path (entryPath)))(Jar (entryPath).mainClass).flatten
200
200
}.isDefined
201
201
}
202
- targetToRun match
202
+ val newSettings =
203
+ targetToRun match
203
204
case Some (fqName) =>
204
- run( settings.withTargetToRun(fqName).withResidualArgs(settings. residualArgs.filter { _ != fqName } * ) .withExecuteMode(ExecuteMode .Run ) )
205
+ settings.withTargetToRun(fqName).copy( residualArgs = settings.residualArgs.filterNot( fqName. == )) .withExecuteMode(ExecuteMode .Run )
205
206
case None =>
206
- run(settings.withExecuteMode(ExecuteMode .Repl ))
207
+ settings.withExecuteMode(ExecuteMode .Repl )
208
+ run(newSettings)
207
209
case ExecuteMode .Run =>
208
210
val scalaClasspath = ClasspathFromClassloader (Thread .currentThread().getContextClassLoader).split(classpathSeparator)
209
211
val newClasspath = (settings.classPath.flatMap(_.split(classpathSeparator).filter(_.nonEmpty)) ++ removeCompiler(scalaClasspath) :+ " ." ).map(File (_).toURI.toURL)
You can’t perform that action at this time.
0 commit comments