From 2c84a5d672214f29d1b515a34cea06cb6fe75ec7 Mon Sep 17 00:00:00 2001 From: Andrea Selva Date: Mon, 21 Jun 2021 14:37:31 +0200 Subject: [PATCH] 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 1f9ef978364a2dfc0d3126679d72eb7dc4f0ae9d) Co-authored-by: Dion Williams --- bin/logstash.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/logstash.bat b/bin/logstash.bat index 123238cf8..28850bb8f 100644 --- a/bin/logstash.bat +++ b/bin/logstash.bat @@ -84,3 +84,4 @@ goto :eof :end endlocal +exit /B %ERRORLEVEL%