Skip to content

Commit

Permalink
fix: omit comparison to bool constant
Browse files Browse the repository at this point in the history
Omit comparison to bool constant.

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
  • Loading branch information
tenthirtyam committed Oct 16, 2024
1 parent b167302 commit 8a25e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builder/vsphere/supervisor/step_import_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (s *StepImportImage) validate(ctx context.Context, logger *PackerLogger) er
}

func (s *StepImportImage) Cleanup(state multistep.StateBag) {
if v, ok := state.GetOk(StateKeyImageImportRequestCreated); !ok || v.(bool) == false {
if v, ok := state.GetOk(StateKeyImageImportRequestCreated); !ok || !v.(bool) {
// Either the image import step was skipped or the object was not created successfully.
// Skip deleting the ContentLibraryItemImportRequest object.
return
Expand Down

0 comments on commit 8a25e5a

Please # to comment.