Skip to content

Commit

Permalink
fix error message (#443)
Browse files Browse the repository at this point in the history
SigDestinationImageName and SigDestinationGalleryName were swapped
  • Loading branch information
sujithq authored Sep 27, 2024
1 parent 94bca09 commit 93909bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builder/azure/arm/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook)
_, err := azureClient.GalleryImageVersionsClient.Get(builderPollingContext, galleryImageVersionId, galleryimageversions.DefaultGetOperationOptions())
if err == nil {
if b.config.PackerForce {
ui.Say(fmt.Sprintf("a gallery image version for image name:version %s:%s already exists in gallery %s, but deleting it due to -force flag", b.config.SharedGalleryDestination.SigDestinationGalleryName, b.config.SharedGalleryDestination.SigDestinationImageVersion, b.config.SharedGalleryDestination.SigDestinationImageName))
ui.Say(fmt.Sprintf("a gallery image version for image name:version %s:%s already exists in gallery %s, but deleting it due to -force flag", b.config.SharedGalleryDestination.SigDestinationImageName, b.config.SharedGalleryDestination.SigDestinationImageVersion, b.config.SharedGalleryDestination.SigDestinationGalleryName))
deleteImageContext, cancel := context.WithTimeout(ctx, azureClient.PollingDuration)
defer cancel()
err := azureClient.GalleryImageVersionsClient.DeleteThenPoll(deleteImageContext, galleryImageVersionId)
Expand Down

0 comments on commit 93909bc

Please sign in to comment.