Skip to content

Commit 36e3c66

Browse files
committed
Partial revert to minimize diff
1 parent 994ed5a commit 36e3c66

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compiler/src/dotty/tools/MainGenericRunner.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,8 @@ object MainGenericRunner {
166166
.withTargetScript(arg)
167167
.withScriptArgs(tail*)
168168
else
169-
val modalSettings = if arg.startsWith("-") then settings else settings.withPossibleEntryPaths(arg).withModeShouldBePossibleRun
170-
val newSettings = modalSettings.withResidualArgs(arg)
171-
process(tail, newSettings)
169+
val newSettings = if arg.startsWith("-") then settings else settings.withPossibleEntryPaths(arg).withModeShouldBePossibleRun
170+
process(tail, newSettings.withResidualArgs(arg))
172171
end process
173172

174173
def main(args: Array[String]): Unit =
@@ -200,8 +199,7 @@ object MainGenericRunner {
200199
Option.when(Jar.isJarOrZip(dotty.tools.io.Path(entryPath)))(Jar(entryPath).mainClass).flatten
201200
}.isDefined
202201
}
203-
val newSettings =
204-
targetToRun match
202+
val newSettings = targetToRun match
205203
case Some(fqName) =>
206204
settings.withTargetToRun(fqName).copy(residualArgs = settings.residualArgs.filterNot(fqName.==)).withExecuteMode(ExecuteMode.Run)
207205
case None =>

0 commit comments

Comments
 (0)