Merge pull request #7126 from hashicorp/fix_7125

fix packer crash that occurs when image is nil
pull/6839/head
Adrien Delorme 7 years ago committed by GitHub
commit e666b60d16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -89,9 +89,14 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
return nil, err
}
image, ok := state.GetOk("image")
if !ok {
return nil, err
}
// Build the artifact and return it
artifact := &Artifact{
Image: state.Get("image").(core.Image),
Image: image.(core.Image),
Region: region,
driver: driver,
}

Loading…
Cancel
Save