fix: only wait for changeset if the result is not empty

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
pull/4296/head
Gergely Brautigam 1 year ago
parent be03ca3b5d
commit a51ede681f
No known key found for this signature in database
GPG Key ID: 3ADEA986CA5BCBF1

@ -76,9 +76,11 @@ func Apply(ctx context.Context, rcg genericclioptions.RESTClientGetter, opts *ru
changeSet.Append(cs.Entries) changeSet.Append(cs.Entries)
} }
if len(changeSet.Entries) > 0 {
if err := waitForSet(rcg, opts, changeSet); err != nil { if err := waitForSet(rcg, opts, changeSet); err != nil {
return "", err return "", err
} }
}
if len(stageTwo) > 0 { if len(stageTwo) > 0 {
cs, err := applySet(ctx, rcg, opts, stageTwo) cs, err := applySet(ctx, rcg, opts, stageTwo)

Loading…
Cancel
Save