Skip to content

Commit

Permalink
Partial revert to minimize diff
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Feb 28, 2022
1 parent 994ed5a commit 36e3c66
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions compiler/src/dotty/tools/MainGenericRunner.scala
Expand Up @@ -166,9 +166,8 @@ object MainGenericRunner {
.withTargetScript(arg)
.withScriptArgs(tail*)
else
val modalSettings = if arg.startsWith("-") then settings else settings.withPossibleEntryPaths(arg).withModeShouldBePossibleRun
val newSettings = modalSettings.withResidualArgs(arg)
process(tail, newSettings)
val newSettings = if arg.startsWith("-") then settings else settings.withPossibleEntryPaths(arg).withModeShouldBePossibleRun
process(tail, newSettings.withResidualArgs(arg))
end process

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

0 comments on commit 36e3c66

Please sign in to comment.