Skip to content

Commit d718a7c

Browse files
committed
Batch files no longer swallow exit codes
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. This simple patch fixes the aforementioned problem. Fixes SI-5295, no review.
1 parent b6617b0 commit d718a7c

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/compiler/scala/tools/ant/templates/tool-windows.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,4 @@ goto :eof
8686

8787
:end
8888
@@endlocal
89+
exit /b %errorlevel%

test/files/jvm/mkLibNatives.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ goto end
6767

6868
:end
6969
if "%OS%"=="Windows_NT" @endlocal
70-
70+
exit /b %errorlevel%

test/partest.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,4 @@ goto end
101101

102102
:end
103103
if "%OS%"=="Windows_NT" @endlocal
104+
exit /b %errorlevel%

0 commit comments

Comments
 (0)