|
|
|
|
@ -3,7 +3,6 @@ package common
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"fmt"
|
|
|
|
|
"log"
|
|
|
|
|
"path/filepath"
|
|
|
|
|
|
|
|
|
|
"github.com/hashicorp/packer/helper/multistep"
|
|
|
|
|
@ -33,7 +32,6 @@ func (c *StepUploadVMX) Run(_ context.Context, state multistep.StateBag) multist
|
|
|
|
|
remoteDriver, ok := driver.(RemoteDriver)
|
|
|
|
|
if ok {
|
|
|
|
|
remoteVmxPath := filepath.ToSlash(filepath.Join(fmt.Sprintf("%s", remoteDriver), filepath.Base(vmxPath)))
|
|
|
|
|
log.Printf("Uploading VMX file from %s to %s", vmxPath, remoteVmxPath)
|
|
|
|
|
if err := remoteDriver.upload(remoteVmxPath, vmxPath); err != nil {
|
|
|
|
|
state.Put("error", fmt.Errorf("Error writing VMX: %s", err))
|
|
|
|
|
return multistep.ActionHalt
|
|
|
|
|
|