Skip to content

Commit

Permalink
Cli: print the type of scalafmt runner for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Nov 9, 2021
1 parent 88a24a1 commit 3db7eb9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scalafmt-cli/src/main/scala/org/scalafmt/cli/Cli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ object Cli {
// (or if the `version` is not specified).
options.getVersionOpt match {
case None => Left(s"error: missing version (current $stableVersion)")
case Some(`stableVersion`) => Right(ScalafmtCoreRunner)
case Some(`stableVersion`) =>
options.common.debug.println(s"Using core runner [$stableVersion]")
Right(ScalafmtCoreRunner)
case Some(v) if isNativeImage =>
Left(
s"""error: invalid Scalafmt version.
Expand All @@ -122,7 +124,9 @@ object Cli {
|Scalafmt automatically installs and invokes the correct version of Scalafmt when running on the JVM.
|""".stripMargin
)
case _ => Right(ScalafmtDynamicRunner)
case Some(v) =>
options.common.debug.println(s"Using dynamic runner [$v]")
Right(ScalafmtDynamicRunner)
}
}

Expand Down

0 comments on commit 3db7eb9

Please sign in to comment.