From 7324c0b1aa4a19cf17695d0e711fb75865229986 Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Mon, 23 Sep 2024 12:55:30 +0200 Subject: [PATCH] fix: modify the wait condition according to return values from earlier method call Signed-off-by: Maciej Szulik --- src/pkg/cluster/zarf.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pkg/cluster/zarf.go b/src/pkg/cluster/zarf.go index b38b55d783..ffa3f64066 100644 --- a/src/pkg/cluster/zarf.go +++ b/src/pkg/cluster/zarf.go @@ -165,8 +165,8 @@ func (c *Cluster) RecordPackageDeploymentAndWait(ctx context.Context, pkg v1alph return nil, err } packageNeedsWait, _, _ = c.PackageSecretNeedsWait(deployedPackage, component, skipWebhooks) - if !packageNeedsWait { - return deployedPackage, nil + if packageNeedsWait { + return nil, errors.New("wait on running webhook") } return deployedPackage, nil }, retry.Context(waitCtx), retry.Attempts(0), retry.DelayType(retry.FixedDelay), retry.Delay(time.Second))