builder/vmware: fix local output dir exists check

This commit is contained in:
Mitchell Hashimoto 2013-11-08 11:48:04 -08:00
parent 2d0270ac65
commit 781332b297
2 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ type localOutputDir struct {
func (d *localOutputDir) DirExists() (bool, error) { func (d *localOutputDir) DirExists() (bool, error) {
_, err := os.Stat(d.dir) _, err := os.Stat(d.dir)
return err == nil, err return err == nil, nil
} }
func (d *localOutputDir) MkdirAll() error { func (d *localOutputDir) MkdirAll() error {

View File

@ -66,8 +66,10 @@ func (s *stepPrepareOutputDir) outputDir(state multistep.StateBag) (dir OutputDi
switch d := driver.(type) { switch d := driver.(type) {
case OutputDir: case OutputDir:
log.Printf("Using driver as the OutputDir implementation")
dir = d dir = d
default: default:
log.Printf("Using localOutputDir implementation")
dir = new(localOutputDir) dir = new(localOutputDir)
} }