Update builder/amazon/ebs/step_create_ami.go

Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
This commit is contained in:
Megan Marsh 2019-11-15 11:39:05 -08:00 committed by Adrien Delorme
parent a35ac0127e
commit ce8bca349f
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ func (s *stepCreateAMI) Run(ctx context.Context, state multistep.StateBag) multi
log.Printf("Unable to determine reason waiting for AMI failed: %s", err)
err = fmt.Errorf("Unknown error waiting for AMI; %s", err)
} else {
if imagesResp != nil && len(imagesResp.Images) > 0 {
if len(imagesResp.Images) > 0 {
image := imagesResp.Images[0]
if image != nil {
stateReason := image.StateReason