builder/amazonebs: check for err parsing template for ami name
This commit is contained in:
parent
e62bcefcb8
commit
b75daf62ff
|
@ -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…
Reference in New Issue