gnodet opened a new pull request, #22162: URL: https://github.com/apache/camel/pull/22162
## Summary Many camel-jbang commands return exit code 0 (success) when validation fails, which breaks scripting and CI/CD usage where non-zero exit codes are expected on errors. This PR fixes `return 0` to `return 1` in 17 files where the code is clearly reporting an error condition: - **PID lookup failures**: When `findPids()` returns no matches or multiple matches, commands now return 1 instead of 0. This affects actions like `send`, `browse`, `dump`, `source`, `thread-dump`, `stub`, `load`, `route-dump`, `route-structure`, `startup-recorder`, `route-controller`, `bean-dump`, and `jolokia`. - **Header/option format validation**: `CamelSendAction`, `TransformMessageAction`, and `EvalExpressionCommand` now return 1 when headers/options are not in `key=value` format. - **Interactive mode constraint**: `CamelHistoryAction` now returns 1 when interactive mode is used with multiple Camel applications. - **Plugin not found**: `PluginDelete` now returns 1 when the plugin to delete is not found in configuration. ### Affected files - `CamelBeanDump.java` - `CamelBrowseAction.java` - `CamelHistoryAction.java` - `CamelLoadAction.java` - `CamelRouteDumpAction.java` - `CamelRouteStructureAction.java` - `CamelSendAction.java` - `CamelSourceAction.java` - `CamelSourceTop.java` - `CamelStartupRecorderAction.java` - `CamelStubAction.java` - `CamelThreadDump.java` - `EvalExpressionCommand.java` - `RouteControllerAction.java` - `TransformMessageAction.java` - `PluginDelete.java` - `Jolokia.java` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
