mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-29 19:24:10 -04:00
builder/vmware: fix local output dir exists check
This commit is contained in:
@@ -23,7 +23,7 @@ type localOutputDir struct {
|
||||
|
||||
func (d *localOutputDir) DirExists() (bool, error) {
|
||||
_, err := os.Stat(d.dir)
|
||||
return err == nil, err
|
||||
return err == nil, nil
|
||||
}
|
||||
|
||||
func (d *localOutputDir) MkdirAll() error {
|
||||
|
||||
@@ -66,8 +66,10 @@ func (s *stepPrepareOutputDir) outputDir(state multistep.StateBag) (dir OutputDi
|
||||
|
||||
switch d := driver.(type) {
|
||||
case OutputDir:
|
||||
log.Printf("Using driver as the OutputDir implementation")
|
||||
dir = d
|
||||
default:
|
||||
log.Printf("Using localOutputDir implementation")
|
||||
dir = new(localOutputDir)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user