Commit e7a46d97 authored by mafro's avatar mafro

salt provisioner: require local_state_tree

parent dc3f156f
......@@ -74,7 +74,11 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
}
}
if p.config.LocalStateTree != "" {
// require a salt state tree
if p.config.LocalStateTree == "" {
errs = packer.MultiErrorAppend(errs,
errors.New("local_state_tree must be supplied"))
} else {
if _, err := os.Stat(p.config.LocalStateTree); err != nil {
errs = packer.MultiErrorAppend(errs,
errors.New("local_state_tree must exist and be accessible"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment