builder/vmware-iso: need to always set local output dir, or non-remote build exports will fail
This commit is contained in:
parent
f8df5f81db
commit
7a2b30dcc4
|
@ -200,9 +200,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
dir = new(vmwcommon.LocalOutputDir)
|
||||
}
|
||||
|
||||
var localDir localOutputDir
|
||||
localDir := localOutputDir{b.config.OutputDir}
|
||||
log.Printf("b.config.OutputDir: %s, localDir: %s", b.config.OutputDir, localDir.dir)
|
||||
if b.config.RemoteType != "" && b.config.Format != "" {
|
||||
localDir = localOutputDir{b.config.OutputDir}
|
||||
b.config.OutputDir = b.config.VMName
|
||||
}
|
||||
dir.SetOutputDir(b.config.OutputDir)
|
||||
|
|
|
@ -60,7 +60,7 @@ func (s *StepExport) Run(state multistep.StateBag) multistep.StepAction {
|
|||
|
||||
// Export the VM
|
||||
localDir := state.Get("localDir").(localOutputDir)
|
||||
outputPath := filepath.Join(fmt.Sprintf("%v", localDir), c.VMName+"."+s.Format)
|
||||
outputPath := filepath.Join(localDir.dir, c.VMName+"."+s.Format)
|
||||
|
||||
if s.Format == "ova" {
|
||||
os.MkdirAll(outputPath, 0755)
|
||||
|
|
Loading…
Reference in New Issue