Skip to content

Commit

Permalink
fix: fix nil point about Outputs.ExitCode. Fixes #7458 (#7459)
Browse files Browse the repository at this point in the history
Signed-off-by: FengyunPan2 <pan_feng_yun@163.com>
  • Loading branch information
FengyunPan2 authored and alexec committed Jan 27, 2022
1 parent 74ed83a commit 77499bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ func buildRetryStrategyLocalScope(node *wfv1.NodeStatus, nodes wfv1.Nodes) map[s
lastChildNode := getChildNodeIndex(node, nodes, -1)

exitCode := "-1"
if lastChildNode.Outputs != nil {
if lastChildNode.Outputs != nil && lastChildNode.Outputs.ExitCode != nil {
exitCode = *lastChildNode.Outputs.ExitCode
}
localScope[common.LocalVarRetriesLastExitCode] = exitCode
Expand Down

0 comments on commit 77499bd

Please sign in to comment.