builder/vmware: fix local output dir exists check
This commit is contained in:
parent
2d0270ac65
commit
781332b297
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue