Skip to content

Commit 1e5905f

Browse files
committed
fix: addressed linter
Signed-off-by: isubasinghe <isitha@pipekit.io>
1 parent 04532ed commit 1e5905f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

workflow/controller/steps.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,14 @@ func (woc *wfOperationCtx) executeSteps(ctx context.Context, nodeName string, tm
165165
woc.buildLocalScope(stepsCtx.scope, prefix, childNode)
166166

167167
if (childNode.Phase == wfv1.NodeSkipped || childNode.Phase == wfv1.NodeOmitted) && childNode.Outputs == nil {
168-
_, tmpl, _, err := stepsCtx.tmplCtx.ResolveTemplate(ctx, &step)
169-
if err == nil && tmpl != nil {
170-
for _, param := range tmpl.Outputs.Parameters {
168+
var resolvedTmpl *wfv1.Template
169+
_, resolvedTmpl, _, err = stepsCtx.tmplCtx.ResolveTemplate(ctx, &step)
170+
if err == nil && resolvedTmpl != nil {
171+
for _, param := range resolvedTmpl.Outputs.Parameters {
171172
key := fmt.Sprintf("%s.outputs.parameters.%s", prefix, param.Name)
172173
stepsCtx.scope.addParamToScope(key, "")
173174
}
174-
if tmpl.Outputs.Result != nil {
175+
if resolvedTmpl.Outputs.Result != nil {
175176
stepsCtx.scope.addParamToScope(fmt.Sprintf("%s.outputs.result", prefix), "")
176177
}
177178
}

0 commit comments

Comments
 (0)