Skip to content

Commit

Permalink
fix ValidateStepResultsVariables and validateTaskResultsVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
jkhelil committed Sep 17, 2024
1 parent cd8a41e commit 0c6cd04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1/task_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ func validateTaskResultsVariables(ctx context.Context, steps []Step, results []T
for _, r := range results {
resultsNames.Insert(r.Name)
}

for idx, step := range steps {
errs = errs.Also(substitution.ValidateNoReferencesToUnknownVariables(step.Script, "results", resultsNames).ViaField("script").ViaFieldIndex("steps", idx))
}
Expand Down Expand Up @@ -859,6 +860,5 @@ func ValidateStepResultsVariables(ctx context.Context, results []StepResult, scr
resultsNames.Insert(r.Name)
}
errs = errs.Also(substitution.ValidateNoReferencesToUnknownVariables(script, "step.results", resultsNames).ViaField("script"))
errs = errs.Also(substitution.ValidateNoReferencesToUnknownVariables(script, "results", resultsNames).ViaField("script"))
return errs
}

0 comments on commit 0c6cd04

Please sign in to comment.