File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ jobs:
111
111
112
112
- name : Cmd Tests
113
113
run : |
114
- ./project/scripts/sbt ";scala3-bootstrapped/compile ; scala3-bootstrapped/publishLocal; scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-test/scripted scala2-compat/* ;configureIDE ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
114
+ ./project/scripts/sbt ";scala3-bootstrapped/compile; scala3-bootstrapped/publishLocal; scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-test/scripted scala2-compat/* ;configureIDE ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
115
115
./project/scripts/bootstrapCmdTests
116
116
117
117
- name : MiMa
Original file line number Diff line number Diff line change 1
1
package dotty .tools
2
2
3
+
3
4
import scala .annotation .tailrec
4
5
import scala .io .Source
5
6
import scala .util .Try
6
- import scala .util .matching .Regex
7
7
import java .net .URLClassLoader
8
8
9
9
enum ExecuteMode :
@@ -46,8 +46,6 @@ case class Settings(
46
46
47
47
object MainGenericRunner {
48
48
49
- val shebangscala : Regex = """ #!.*scala""" .r
50
-
51
49
@ tailrec
52
50
def process (args : List [String ], settings : Settings ): Settings = args match
53
51
case Nil =>
@@ -73,7 +71,7 @@ object MainGenericRunner {
73
71
)
74
72
case arg :: tail =>
75
73
val line = Try (Source .fromFile(arg).getLines.toList).toOption.flatMap(_.headOption)
76
- if arg.endsWith(" .scala" ) || arg.endsWith(" .sc" ) || (line.nonEmpty && shebangscala .matches(line.get)) then
74
+ if arg.endsWith(" .scala" ) || arg.endsWith(" .sc" ) || (line.nonEmpty && raw " #!.*scala " .r .matches(line.get)) then
77
75
settings
78
76
.withExecuteMode(ExecuteMode .Script )
79
77
.withTargetScript(arg)
You can’t perform that action at this time.
0 commit comments