Merge pull request #1771 from neekipatel/master

Allow manifest_file to be a directory for Puppet Masterless Porvisioner
This commit is contained in:
Ross Smith II 2014-12-29 19:40:09 -08:00
commit a2ec4bca96
1 changed files with 1 additions and 4 deletions

View File

@ -176,13 +176,10 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
errs = packer.MultiErrorAppend(errs, errs = packer.MultiErrorAppend(errs,
fmt.Errorf("A manifest_file must be specified.")) fmt.Errorf("A manifest_file must be specified."))
} else { } else {
info, err := os.Stat(p.config.ManifestFile) _, err := os.Stat(p.config.ManifestFile)
if err != nil { if err != nil {
errs = packer.MultiErrorAppend(errs, errs = packer.MultiErrorAppend(errs,
fmt.Errorf("manifest_file is invalid: %s", err)) fmt.Errorf("manifest_file is invalid: %s", err))
} else if info.IsDir() {
errs = packer.MultiErrorAppend(errs,
fmt.Errorf("manifest_file must point to a file"))
} }
} }