This commit is contained in:
Mitchell Hashimoto 2013-07-13 10:01:27 +09:00
parent aaf024514f
commit 2981da4eef
3 changed files with 3 additions and 3 deletions

View File

@ -222,7 +222,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
if _, err := os.Stat(b.config.OutputDir); err == nil {
if b.config.PackerForce {
log.Printf("Build forced, removing existing output directory: %s", string(b.config.OutputDir))
os.RemoveAll(b.config.OutputDir)
os.RemoveAll(b.config.OutputDir)
} else {
errs = append(errs, errors.New("Output directory already exists. It must not exist."))
}

View File

@ -178,7 +178,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
if _, err := os.Stat(b.config.OutputDir); err == nil {
if b.config.PackerForce {
log.Printf("Build forced, removing existing output directory: %s", string(b.config.OutputDir))
os.RemoveAll(b.config.OutputDir)
os.RemoveAll(b.config.OutputDir)
} else {
errs = append(errs, errors.New("Output directory already exists. It must not exist."))
}