Skip to content

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

Merged
andsel merged 1 commit intoelastic:7.xfrom
andsel:backport_12948_7.x
Jun 21, 2021
Merged

Fix logstash.bat not setting exit code (#12948)#13007
andsel merged 1 commit intoelastic:7.xfrom
andsel:backport_12948_7.x

Conversation

@andsel
Copy link
Contributor

@andsel andsel commented Jun 21, 2021

Clean backport #12948 to branch 7.x

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 1f9ef97)

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 1f9ef97)
Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants