Commit b75daf62 authored by Jack Pearkes's avatar Jack Pearkes

builder/amazonebs: check for err parsing template for ami name

parent e62bcefc
...@@ -29,7 +29,11 @@ func (s *stepCreateAMI) Run(state map[string]interface{}) multistep.StepAction { ...@@ -29,7 +29,11 @@ func (s *stepCreateAMI) Run(state map[string]interface{}) multistep.StepAction {
strconv.FormatInt(time.Now().UTC().Unix(), 10), strconv.FormatInt(time.Now().UTC().Unix(), 10),
} }
t := template.Must(template.New("ami").Parse(config.AMIName)) t, err := template.New("ami").Parse(config.AMIName)
if err != nil {
ui.Error(err.Error())
return multistep.ActionHalt
}
t.Execute(amiNameBuf, tData) t.Execute(amiNameBuf, tData)
amiName := amiNameBuf.String() amiName := amiNameBuf.String()
......
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