Skip to content
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

scala.bat doesn't work if called from Cygwin bash shell #4800

Closed
scabug opened this issue Jul 14, 2011 · 2 comments
Closed

scala.bat doesn't work if called from Cygwin bash shell #4800

scabug opened this issue Jul 14, 2011 · 2 comments

Comments

@scabug
Copy link

scabug commented Jul 14, 2011

If scala.bat is run from a Cygwin bash shell on Windows XP the value of OS variable is CYGWIN_NT-5.1, not Windows_NT. Thus you need to check for %OS% NEQ Windows_NT and %OS:~0,9% NEQ CYGWIN_NT before bailing out.

@scabug
Copy link
Author

scabug commented Jul 14, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4800?orig=1
Reporter: Olivier Lefevre (olefevre)
Affected Versions: 2.9.0

@scabug
Copy link
Author

scabug commented Nov 13, 2011

Commit Message Bot (anonymous) said:
(extempore in r25993) Made windows less aggressive about failing.

There's no way to ever correctly check against a platform
String and then fail if it doesn't exactly match. You have
to handle such things gracefully, because even if you have
omniscience and omnipotence at the time you write it, you will
become wrong later.

// example of a condition a vast distance from what should
// be tested before intentionally failing
if "%OS%" NEQ "Windows_NT"

Closes #4800.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant