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

Windows: scala batch files swallow exitcodes under certain fancy circumstances

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: None
    • Component/s: Packaging
    • Labels:
      None
    • Environment:

      Win 2008 R2 x64 SP1 (equivalent of Win 7 x64 SP1)

      Description

      Usually scripts like scala.bat and scalac.bat correctly propagate exit codes from underlying Java invocations. However, if you run these scripts as follows: "cmd /c scala ...", then errorlevel gets swallowed.

        Activity

        Hide
        Eugene Burmako added a comment -

        Fixing the problem is as easy as adding "exit /b %errorlevel%" at the end of a batch file. Here's my pull request to scala/scala: https://github.com/scala/scala/pull/53

        Show
        Eugene Burmako added a comment - Fixing the problem is as easy as adding "exit /b %errorlevel%" at the end of a batch file. Here's my pull request to scala/scala: https://github.com/scala/scala/pull/53
        Hide
        Eugene Burmako added a comment -
        Show
        Eugene Burmako added a comment - Fixed by https://github.com/scala/scala/pull/54

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Eugene Burmako
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development