Skip to content

Commit

Permalink
[bug] check error on FillParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmey committed Jun 3, 2019
1 parent da80784 commit 7b6ed8c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions builder/azure/chroot/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
return nil, errors.New("the azure-chroot builder only works on Linux environments")
}

b.config.ClientConfig.FillParameters()
err := b.config.ClientConfig.FillParameters()
if err != nil {
return nil, fmt.Errorf("error setting Azure client defaults: %v", err)
}
azcli, err := client.New(b.config.ClientConfig, ui.Say)
if err != nil {
return nil, fmt.Errorf("error creating Azure client: %v", err)
Expand Down Expand Up @@ -281,12 +284,9 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
}

state.Put("instance", info)
if err != nil {
return nil, err
}

// Build the steps
steps := []multistep.Step{}
var steps []multistep.Step

if b.config.FromScratch {
steps = append(steps,
Expand Down

0 comments on commit 7b6ed8c

Please sign in to comment.