@@ -105,9 +105,10 @@ object MainGenericRunner {
105105 case " -run" :: fqName :: tail =>
106106 process(tail, settings.withExecuteMode(ExecuteMode .Run ).withTargetToRun(fqName))
107107 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
109109 (tail, cp)
110110 else
111+ // combine globbed classpath entries into a classpath
111112 val globdir = cp.replace('\\ ' , '/' ).replaceAll(" /[^/]*$" ," " )
112113 val jarfiles = cp :: tail
113114 val cpfiles = jarfiles.takeWhile( f => f.startsWith(globdir) && ((f.toLowerCase.endsWith(" .jar" ) || f.endsWith(" .zip" ))) )
@@ -151,13 +152,6 @@ object MainGenericRunner {
151152 val newSettings = if arg.startsWith(" -" ) then settings else settings.withPossibleEntryPaths(arg).withModeShouldBePossibleRun
152153 process(tail, newSettings.withResidualArgs(arg))
153154
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-
161155 def main (args : Array [String ]): Unit =
162156 val scalaOpts = envOrNone(" SCALA_OPTS" ).toArray.flatMap(_.split(" " ))
163157 val allArgs = scalaOpts ++ args
0 commit comments