Skip to content

ExitCodeAutoConfiguration doesn't map CommandParserExceptionsException #961

@jvalkeal

Description

@jvalkeal

Boot upgrade in #952.

There is a change between spring-boot 3.2.0 and 3.2.1 in its runner logic where exception is no longer wrapped in IllegalStateException.

In below code we used to check cause assuming actual exception is CommandExecution.CommandParserExceptionsException.

if (exception.getCause() instanceof CommandExecution.CommandParserExceptionsException) {
return 2;
}

We can mitigate this by checking both exception itself and it's cause(in case user don't compile against the spring-boot version spring-shell is testing).

This also happens with spring-shell 3.1.x as change in spring-boot was backported into 3.1.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions