Skip to content

Commit

Permalink
fix: modify the wait condition according to return values from earlie…
Browse files Browse the repository at this point in the history
…r method call

Signed-off-by: Maciej Szulik <[email protected]>
  • Loading branch information
soltysh committed Sep 23, 2024
1 parent 7ac8297 commit 7324c0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pkg/cluster/zarf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7324c0b

Please sign in to comment.