diff --git a/pkg/apis/pipeline/v1beta1/when_types.go b/pkg/apis/pipeline/v1beta1/when_types.go index 8cea2f5ebf1..f792ec199c8 100644 --- a/pkg/apis/pipeline/v1beta1/when_types.go +++ b/pkg/apis/pipeline/v1beta1/when_types.go @@ -105,10 +105,7 @@ type WhenExpressions []WhenExpression // if the Task should be skipped. func (wes WhenExpressions) AllowsExecution(evaluatedCEL map[string]bool) bool { for _, we := range wes { - if we.CEL != "" { - return evaluatedCEL[we.CEL] - } - if !we.isTrue() { + if !we.isTrue() || (we.CEL != "" && !evaluatedCEL[we.CEL]) { return false } }