File tree Expand file tree Collapse file tree 5 files changed +6
-23
lines changed Expand file tree Collapse file tree 5 files changed +6
-23
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ object MainGenericRunner {
157157 process(tail, newSettings.withResidualArgs(arg))
158158
159159 def main (args : Array [String ]): Unit =
160- val scalaOpts = envOrNone(" SCALA_OPTS" ).toArray.flatMap(_.split(" " ))
160+ val scalaOpts = envOrNone(" SCALA_OPTS" ).toArray.flatMap(_.split(" " )).filter(_.nonEmpty)
161161 val allArgs = scalaOpts ++ args
162162 val settings = process(allArgs.toList, Settings ())
163163 if settings.exitCode != 0 then System .exit(settings.exitCode)
Original file line number Diff line number Diff line change 1- #!dist/target/pack/ bin/scala -classpath dist/target/pack/lib/*
1+ #!/usr/bin/env -S bin/scala -classpath ' dist/target/pack/lib/*'
22
33import java .nio .file .Paths
44
Original file line number Diff line number Diff line change 1- #!bin/scala -classpath 'dist/target/pack/lib/*'
1+ #!/usr/bin/env -S bin/scala -classpath 'dist/target/pack/lib/*'
22
33// won't compile unless the hashbang line sets classpath
44import org .jline .terminal .Terminal
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ class ClasspathTests:
4141
4242 cmd.foreach { printf(" [%s]\n " , _) }
4343
44- // test script reports the classpath it sees
44+ // test script reports the classpath it sees
4545 val scriptOutput = exec(cmd:_* )
4646 val scriptCwd = findTaggedLine(" cwd" , scriptOutput)
4747 printf(" script ran in directory [%s]\n " , scriptCwd)
4848 val scriptCp = findTaggedLine(" classpath" , scriptOutput)
4949
5050 val hashbangClasspathJars = scriptCp.split(psep).map { _.getName }.sorted.distinct
5151 val packlibJars = listJars(s " $scriptCwd/ $packLibDir" ).sorted.distinct
52-
52+
5353 printf(" %d jar files in dist/target/pack/lib\n " , packlibJars.size)
5454 printf(" %d test script jars in classpath\n " , hashbangClasspathJars.size)
5555
@@ -78,7 +78,7 @@ class ClasspathTests:
7878
7979 cmd.foreach { printf(" [%s]\n " , _) }
8080
81- // test script reports the classpath it sees
81+ // test script reports the classpath it sees
8282 val scriptOutput = exec(cmd:_* )
8383 val scriptCp = findTaggedLine(" unglobbed classpath" , scriptOutput)
8484 val classpathJars = scriptCp.split(psep).map { _.getName }.sorted.distinct
You can’t perform that action at this time.
0 commit comments