fix panic in proxmox builder

This commit is contained in:
Adrien Delorme 2019-09-04 14:21:52 +02:00
parent 5061c3eb73
commit d113dd12c1
1 changed files with 6 additions and 1 deletions

View File

@ -90,8 +90,13 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
return nil, rawErr.(error)
}
tplID, ok := state.Get("template_id").(int)
if !ok {
return nil, fmt.Errorf("template ID could not be determined")
}
artifact := &Artifact{
templateID: state.Get("template_id").(int),
templateID: tplID,
proxmoxClient: b.proxmoxClient,
}