Skip to content

Exit code is always 0 for non-interactive runner #1339

@ffried

Description

@ffried

The NonInteractiveShellRunner silently swallows error, leading to a 0 exit code even though the command failed:

https://github.com/spring-projects/spring-shell/blob/main/spring-shell-core/src/main/java/org/springframework/shell/core/NonInteractiveShellRunner.java#L158

We have jobs that rely on the exit code being non-zero on failures to e.g. be restarted or properly handled.
For that, we also have custom exit code mappers to make sure the exit code is set accordingly.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions