@@ -105,9 +105,10 @@ object MainGenericRunner {
105
105
case " -run" :: fqName :: tail =>
106
106
process(tail, settings.withExecuteMode(ExecuteMode .Run ).withTargetToRun(fqName))
107
107
case (" -cp" | " -classpath" | " --class-path" ) :: cp :: tail =>
108
- val (tailargs, cpstr) = if classpathSeparator != ';' || cp.contains(classpathSeparator) then
108
+ val (tailargs, cpstr) = if classpathSeparator != " ; " || cp.contains(classpathSeparator) then
109
109
(tail, cp)
110
110
else
111
+ // combine globbed classpath entries into a classpath
111
112
val globdir = cp.replace('\\ ' , '/' ).replaceAll(" /[^/]*$" ," " )
112
113
val jarfiles = cp :: tail
113
114
val cpfiles = jarfiles.takeWhile( f => f.startsWith(globdir) && ((f.toLowerCase.endsWith(" .jar" ) || f.endsWith(" .zip" ))) )
@@ -151,13 +152,6 @@ object MainGenericRunner {
151
152
val newSettings = if arg.startsWith(" -" ) then settings else settings.withPossibleEntryPaths(arg).withModeShouldBePossibleRun
152
153
process(tail, newSettings.withResidualArgs(arg))
153
154
154
- // collect globbed classpath entries
155
- def collectGlobbedEntries (entries : List [String ]): (List [String ], List [String ]) = {
156
- val cpfiles = entries.takeWhile( f => (f.toLowerCase.endsWith(" .jar" ) || f.endsWith(" .zip" )) )
157
- val remainder = entries.drop(cpfiles.size)
158
- (cpfiles, remainder)
159
- }
160
-
161
155
def main (args : Array [String ]): Unit =
162
156
val scalaOpts = envOrNone(" SCALA_OPTS" ).toArray.flatMap(_.split(" " ))
163
157
val allArgs = scalaOpts ++ args
0 commit comments