File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
modules/cli/src/main/scala/scala/cli/commands/fix Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,6 @@ object ScalafixRules extends CommandHelpers {
56
56
)
57
57
else buildOptions
58
58
59
- val scalaVersion =
60
- buildOptions.scalaParams.orExit(logger).map(_.scalaVersion)
61
- .getOrElse(Constants .defaultScalaVersion)
62
-
63
59
val shouldBuildTestScope = sharedOptions.scope.test.getOrElse(true )
64
60
if ! shouldBuildTestScope then
65
61
logger.message(
@@ -89,6 +85,13 @@ object ScalafixRules extends CommandHelpers {
89
85
successfulBuilds.headOption.toSeq
90
86
.flatMap(_.options.scalaOptions.scalacOptions.toSeq.map(_.value.value))
91
87
88
+ val scalaVersion = {
89
+ for {
90
+ b <- successfulBuilds.headOption
91
+ scalaParams <- b.scalaParams
92
+ } yield scalaParams.scalaVersion
93
+ }.getOrElse(Constants .defaultScalaVersion)
94
+
92
95
either {
93
96
val artifacts =
94
97
value(
You can’t perform that action at this time.
0 commit comments