Commit e62bcefc authored by Jack Pearkes's avatar Jack Pearkes

builder/digitalocean: check for err parsing template for snapshot name

parent 5ecd30a7
......@@ -134,7 +134,10 @@ func (b *Builder) Prepare(raws ...interface{}) error {
tData := snapshotNameData{
strconv.FormatInt(time.Now().UTC().Unix(), 10),
}
t := template.Must(template.New("snapshot").Parse(b.config.RawSnapshotName))
t, err := template.New("snapshot").Parse(b.config.RawSnapshotName)
if err != nil {
errs = append(errs, fmt.Errorf("Failed parsing snapshot_name: %s", err))
}
t.Execute(snapNameBuf, tData)
b.config.SnapshotName = snapNameBuf.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