Windows runner doesn't handle error code
On Windows exclusively using runner v1.0.4 (same issue with 1.0.2 at least), the runner doesn't exit if the command returns an error and returns a success build.
Examples:
Windows:
script:
- call python -c "import sys; sys.exit(99)"
- echo %ERRORLEVEL%
- call python -c "print('test')"
tags:
- windows
$ call python -c "import sys; sys.exit(99)"
$ echo %ERRORLEVEL%
99
$ call python -c "print('test')"
test
Build succeeded.
results in a print of "99" and "test" but the runner doesn't exit after the first line of script. It runs all lines. The result is a success build (which is not).
Windows:
script:
- call python -c "import sys; sys.exit(99)"
- echo %ERRORLEVEL%
tags:
- windows
$ call python -c "import sys; sys.exit(99)"
$ echo %ERRORLEVEL%
99
ERROR: Build failed with: exit status 99
results in a print of "99" and the runner exit only after the second line of script with an error. The return code and the build result is ok, but the runner shouldn't run the second line of the script.
Thanks