Skip to content

Fix for java command in bin/scala #11428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2021
Merged

Conversation

liufengyun
Copy link
Contributor

Fix for java command in bin/scala

Co-authored-by: Stephane MICHELOUD [email protected]

Co-authored-by: Stephane MICHELOUD <[email protected]>
@michelou
Copy link
Contributor

Fix for java command in bin/scala

Co-authored-by: Stephane MICHELOUD [email protected]

This was a fast feedback ! Let me check your update with my local changes (NB. Tests with my batch file scala.bat are also on the way 😉).

@michelou
Copy link
Contributor

michelou commented Feb 16, 2021

Fix for java command in bin/scala

Co-authored-by: Stephane MICHELOUD [email protected]

First test results on MingW64 (w/o options) :

$ uname
MINGW64_NT-10.0-19041

user@host MINGW64 /w/dotty
$ for i in compiler/test-resources/scripting/*.sc; do /c/opt/scala-3.0.0-M4-bin-SNAPSHOT/bin/scala $i; done
mainClassFromStack: hashBang$package$
mainClassFromStack: Zoo
script.path: compiler/test-resources/scripting/scriptPath.sc

user@host MINGW64 /w/dotty
$ for i in compiler/test-resources/scripting/*.scala; do /c/opt/scala-3.0.0-M4-bin-SNAPSHOT/bin/scala $i World; done
arg 0: [World]
parentDir: [W:\dotty\compiler\test-resources\scripting]

First test results on Cygwin (w/o options) :

$ uname
CYGWIN_NT-10.0

user@host ~/workspace/dotty-examples/dotty
$ for i in compiler/test-resources/scripting/*.sc; do /cygdrive/c/opt/scala-3.0.0-M4-bin-SNAPSHOT/bin/scala $i; done
mainClassFromStack: hashBang$package$
mainClassFromStack: Zoo
script.path: compiler/test-resources/scripting/scriptPath.sc

user@host ~/workspace/dotty-examples/dotty
$ for i in compiler/test-resources/scripting/*.scala; do /cygdrive/c/opt/scala-3.0.0-M4-bin-SNAPSHOT/bin/scala $i World; done
arg 0: [World]
parentDir: [C:\users\michelou\workspace\dotty-examples\dotty\compiler\test-resources\scripting]

First test results on WIndows prompt (w/o options) :

$ ver
Microsoft Windows [version 10.0.19041.804]

$ for %i in (compiler\test-resources\scripting\*.scala) do @c:\opt\scala-3.0.0-M4-bin-SNAPSHOT\bin\scala %i World
arg 0: [World]
parentDir: [W:\dotty\compiler\test-resources\scripting]

Note: Files compiler\test-resources\scripting\*.sc cannot be executed in the Windows prompt. The file header of *.sc files should be defined somewhere so somebody (e.g. myself) could also support them on Windows.

@liufengyun
Copy link
Contributor Author

Thank you @michelou 👍

@liufengyun liufengyun merged commit a899833 into scala:master Feb 16, 2021
@liufengyun liufengyun deleted the fix-script branch February 16, 2021 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants