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

pull/24/head
Jack Pearkes 13 years ago
parent 1a6f410257
commit e0a4e72be5

@ -29,7 +29,11 @@ func (s *stepCreateAMI) Run(state map[string]interface{}) multistep.StepAction {
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)
amiName := amiNameBuf.String()

Loading…
Cancel
Save