Skip to content

Commit

Permalink
shebang lines work on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed May 20, 2022
1 parent a117aff commit aa554da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions compiler/test-resources/scripting/classpathReport.sc
@@ -1,4 +1,4 @@
#!bin/scala -classpath 'dist/target/pack/lib/*'
#!/usr/bin/env -S bin/scala -classpath 'dist/target/pack/lib/*'

import java.nio.file.Paths

Expand All @@ -9,4 +9,3 @@ def main(args: Array[String]): Unit =

extension(s: String)
def norm: String = s.replace('\\', '/')

2 changes: 1 addition & 1 deletion compiler/test-resources/scripting/scriptPath.sc
@@ -1,4 +1,4 @@
#!dist/target/pack/bin/scala
#!/usr/bin/env dist/target/pack/bin/scala

def main(args: Array[String]): Unit =
args.zipWithIndex.foreach { case (arg,i) => printf("arg %d: [%s]\n",i,arg) }
Expand Down
2 changes: 1 addition & 1 deletion compiler/test-resources/scripting/sqlDateError.sc
@@ -1,4 +1,4 @@
#!bin/scala
#!/usr/bin/env -S bin/scala

def main(args: Array[String]): Unit = {
println(new java.sql.Date(100L))
Expand Down
4 changes: 2 additions & 2 deletions compiler/test-resources/scripting/unglobClasspath.sc
@@ -1,7 +1,7 @@
#!bin/scala -classpath 'dist/target/pack/lib/*'
#!/usr/bin/env -S bin/scala -classpath 'dist/target/pack/lib/*'

// won't compile unless the hashbang line sets classpath
import org.jline.terminal.Terminal
import org.jsoup.Jsoup

def main(args: Array[String]) =
val cp = sys.props("java.class.path")
Expand Down

0 comments on commit aa554da

Please sign in to comment.