File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
modules/cli/src/main/scala/scala/cli/commands Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,21 @@ object Repl extends ScalaCommand[ReplOptions] {
28
28
def buildOptions (ops : ReplOptions ): BuildOptions = {
29
29
import ops ._
30
30
import ops .sharedRepl ._
31
- def ammoniteVersionOpt = ammoniteVersion.map(_.trim).filter(_.nonEmpty)
31
+ val ammoniteVersionOpt = ammoniteVersion.map(_.trim).filter(_.nonEmpty)
32
32
33
- val baseOptions = shared.buildOptions()
33
+ val baseOptions = shared.copy(scalaVersion =
34
+ if (
35
+ ammonite.contains(true ) &&
36
+ (shared.scalaVersion.isEmpty || shared.scalaVersion.contains(" 3.2.0" )) &&
37
+ ammoniteVersionOpt.isEmpty
38
+ ) {
39
+ // TODO remove this once ammonite adds support for 3.2.0
40
+ System .err.println(" Scala 3.2.0 is not yet supported with this version of ammonite" )
41
+ System .err.println(" Defaulting to Scala 3.1.3" )
42
+ Some (" 3.1.3" )
43
+ }
44
+ else shared.scalaVersion
45
+ ).buildOptions()
34
46
baseOptions.copy(
35
47
javaOptions = baseOptions.javaOptions.copy(
36
48
javaOpts =
You can’t perform that action at this time.
0 commit comments