Fix logstash.bat not setting exit code (#12948) (#13007)

This PR makes the Windows logstash.bat exit with the last %ERRORLEVEL% at the end, so that any error in running Logstash will get propagated back to the command line.

Before this change, logstash.bat would always exit with code 0 - success (when doing cmd.exe /C logstash.bat), even if the java.exe process exited with a non-zero code (e.g. due to Logstash throwing an error at runtime).

(cherry picked from commit 1f9ef97836)

Co-authored-by: Dion Williams <dionrhys1@gmail.com>
This commit is contained in:
Andrea Selva 2021-06-21 14:37:31 +02:00 committed by GitHub
parent 75d616eba7
commit 2c84a5d672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,3 +84,4 @@ goto :eof
:end
endlocal
exit /B %ERRORLEVEL%