Skip to content

Commit 12a8935

Browse files
Merge pull request openshift#7826 from r4f4/azure-ic-fmt-error-fix
OCPBUGS-25191: ic: azure: fix retrieving marketplace image
2 parents 271f256 + 155c12f commit 12a8935

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/asset/installconfig/azure/client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,10 @@ func (c *Client) GetMarketplaceImage(ctx context.Context, region, publisher, off
330330
defer cancel()
331331

332332
image, err := client.Get(ctx, region, publisher, offer, sku, version)
333-
return image, fmt.Errorf("could not get marketplace image: %w", err)
333+
if err != nil {
334+
return image, fmt.Errorf("could not get marketplace image: %w", err)
335+
}
336+
return image, nil
334337
}
335338

336339
// AreMarketplaceImageTermsAccepted tests whether the terms have been accepted for the specified marketplace VM image.

0 commit comments

Comments
 (0)