Scala Programming Language
  1. Scala Programming Language
  2. SI-4800

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.0
    • Fix Version/s: None
    • Component/s: Repl / Interpreter
    • Environment:

      Windows XP SP3 32bit

      Description

      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.

        Activity

        Hide
        Commit Message Bot added a comment -

        (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 SI-4800.

        Show
        Commit Message Bot added a comment - (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 SI-4800 .

          People

          • Assignee:
            Unassigned
            Reporter:
            Olivier Lefevre
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development