diff --git a/builder/hyperv/common/step_create_build_dir.go b/builder/hyperv/common/step_create_build_dir.go index 6692afad4..8641ddca4 100644 --- a/builder/hyperv/common/step_create_build_dir.go +++ b/builder/hyperv/common/step_create_build_dir.go @@ -10,23 +10,23 @@ import ( "github.com/hashicorp/packer/packer" ) -type StepCreateTempDir struct { +type StepCreateBuildDir struct { // User supplied directory under which we create the main build - // directory. The build directory is used to house the VM files and + // directory. The build directory is used to house the VM files and // folders during the build. If unspecified the default temp directory // for the OS is used TempPath string - // The full path to the build directory. This is concatenation of + // The full path to the build directory. This is the concatenation of // TempPath plus a directory uniquely named for the build dirPath string } // Creates the main directory used to house the VMs files and folders // during the build -func (s *StepCreateTempDir) Run(_ context.Context, state multistep.StateBag) multistep.StepAction { +func (s *StepCreateBuildDir) Run(_ context.Context, state multistep.StateBag) multistep.StepAction { ui := state.Get("ui").(packer.Ui) - ui.Say("Creating temporary directory...") + ui.Say("Creating build directory...") if s.TempPath == "" { s.TempPath = os.TempDir() @@ -34,7 +34,7 @@ func (s *StepCreateTempDir) Run(_ context.Context, state multistep.StateBag) mul packerTempDir, err := ioutil.TempDir(s.TempPath, "packerhv") if err != nil { - err := fmt.Errorf("Error creating temporary directory: %s", err) + err := fmt.Errorf("Error creating build directory: %s", err) state.Put("error", err) ui.Error(err.Error()) return multistep.ActionHalt @@ -47,16 +47,16 @@ func (s *StepCreateTempDir) Run(_ context.Context, state multistep.StateBag) mul } // Cleanup removes the build directory -func (s *StepCreateTempDir) Cleanup(state multistep.StateBag) { +func (s *StepCreateBuildDir) Cleanup(state multistep.StateBag) { if s.dirPath == "" { return } ui := state.Get("ui").(packer.Ui) - ui.Say("Deleting temporary directory...") + ui.Say("Deleting build directory...") err := os.RemoveAll(s.dirPath) if err != nil { - ui.Error(fmt.Sprintf("Error deleting temporary directory: %s", err)) + ui.Error(fmt.Sprintf("Error deleting build directory: %s", err)) } } diff --git a/builder/hyperv/iso/builder.go b/builder/hyperv/iso/builder.go index f6627b8fe..fd51c85c0 100644 --- a/builder/hyperv/iso/builder.go +++ b/builder/hyperv/iso/builder.go @@ -350,7 +350,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe state.Put("ui", ui) steps := []multistep.Step{ - &hypervcommon.StepCreateTempDir{ + &hypervcommon.StepCreateBuildDir{ TempPath: b.config.TempPath, }, &hypervcommon.StepOutputDir{ diff --git a/builder/hyperv/vmcx/builder.go b/builder/hyperv/vmcx/builder.go index ada64faf0..7ae54a18d 100644 --- a/builder/hyperv/vmcx/builder.go +++ b/builder/hyperv/vmcx/builder.go @@ -362,7 +362,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe state.Put("ui", ui) steps := []multistep.Step{ - &hypervcommon.StepCreateTempDir{}, + &hypervcommon.StepCreateBuildDir{}, &hypervcommon.StepOutputDir{ Force: b.config.PackerForce, Path: b.config.OutputDir,