Skip to content

Commit 4a44f45

Browse files
committed
fix: Action framework: Return proper exit code as set by exit instruction
1 parent 0cb7011 commit 4a44f45

File tree

1 file changed

+2
-0
lines changed
  • fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/runner

1 file changed

+2
-0
lines changed

fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/runner/ActionRunner.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public final Integer _run(String[] args) {
6767
processAndPrintCheckStatuses(ctx.getCheckStatuses());
6868
overallCheckstatus = processAndPrintCheckStatuses(checkStatuses);
6969
}
70+
// Retrieve exit code set by action's exit step (if any)
71+
exitCode = ctx.getExitCode();
7072
}
7173
// Determine final exit code
7274
return exitCode==0 && overallCheckstatus==CheckStatus.FAIL ? 100 : exitCode;

0 commit comments

Comments
 (0)