@@ -106,7 +106,7 @@ object MainGenericRunner {
106106 process(tail, settings.withExecuteMode(ExecuteMode .Run ).withTargetToRun(fqName))
107107 case (" -cp" | " -classpath" | " --class-path" ) :: cp :: tail =>
108108 val cpEntries = cp.split(classpathSeparator).toList
109- val singleEntryClasspath : Boolean = cpEntries.nonEmpty && cpEntries.drop( 1 ).isEmpty
109+ val singleEntryClasspath : Boolean = cpEntries.take( 2 ).size == 1
110110 val globdir : String = if singleEntryClasspath then cp.replaceAll(" [\\\\ /][^\\\\ /]*$" , " " ) else " " // slash/backslash agnostic
111111 def validGlobbedJar (s : String ): Boolean = s.startsWith(globdir) && ((s.toLowerCase.endsWith(" .jar" ) || s.toLowerCase.endsWith(" .zip" )))
112112 val (tailargs, newEntries) = if singleEntryClasspath && validGlobbedJar(cpEntries.head) then
@@ -243,22 +243,4 @@ object MainGenericRunner {
243243 e.foreach(_.printStackTrace())
244244 ! isFailure
245245 }
246-
247- def display (settings : Settings )= Seq (
248- s " verbose: ${settings.verbose}" ,
249- s " classPath: ${settings.classPath.mkString(" \n " ," \n " ," " )}" ,
250- s " executeMode: ${settings.executeMode}" ,
251- s " exitCode: ${settings.exitCode}" ,
252- s " javaArgs: ${settings.javaArgs}" ,
253- s " scalaArgs: ${settings.scalaArgs}" ,
254- s " residualArgs: ${settings.residualArgs}" ,
255- s " possibleEntryPaths: ${settings.possibleEntryPaths}" ,
256- s " scriptArgs: ${settings.scriptArgs}" ,
257- s " targetScript: ${settings.targetScript}" ,
258- s " targetToRun: ${settings.targetToRun}" ,
259- s " save: ${settings.save}" ,
260- s " modeShouldBePossibleRun: ${settings.modeShouldBePossibleRun}" ,
261- s " modeShouldBeRun: ${settings.modeShouldBeRun}" ,
262- s " compiler: ${settings.compiler}" ,
263- )
264246}
0 commit comments