Merge pull request #1771 from neekipatel/master
Allow manifest_file to be a directory for Puppet Masterless Porvisioner
This commit is contained in:
commit
a2ec4bca96
|
@ -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"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue