Fix DefaultShellApplicationRunner error handling

- Let error from ShellRunner to pass through
  as that's needed for other error handling
  and used by exit code mappings
- Relates #1057
This commit is contained in:
Janne Valkealahti
2024-05-03 08:12:31 +01:00
parent 71960e5415
commit 419f6a8aa4

View File

@@ -61,11 +61,9 @@ public class DefaultShellApplicationRunner implements ShellApplicationRunner {
String[] sourceArgs = args.getSourceArgs();
boolean canRun = false;
for (ShellRunner runner : shellRunners) {
try {
canRun = runner.run(sourceArgs);
} catch (Exception e) {
break;
}
// let exception to get thrown as needed i.e. for
// exit code mappings
canRun = runner.run(sourceArgs);
if (canRun) {
break;
}