From ec7086cd7448746f8756b726ede1472f07abdff9 Mon Sep 17 00:00:00 2001 From: remi-espie Date: Thu, 27 Jun 2024 09:48:27 +0200 Subject: [PATCH] fix: ensure `isoPath` is a string variable --- builder/vmware/common/step_create_disks.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builder/vmware/common/step_create_disks.go b/builder/vmware/common/step_create_disks.go index 29c89a4f..593ae991 100644 --- a/builder/vmware/common/step_create_disks.go +++ b/builder/vmware/common/step_create_disks.go @@ -27,7 +27,10 @@ type StepCreateDisks struct { func (s *StepCreateDisks) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { driver := state.Get("driver").(Driver) ui := state.Get("ui").(packersdk.Ui) - isoPath := state.Get("iso_path").(string) + isoPath, err := state.Get("iso_path").(string) + if !err { + isoPath = "" + } ui.Say("Creating required virtual machine disks")