Move 'ui' variable closer to invocation.

This commit is contained in:
Stephen Fox 2019-07-31 14:08:40 -04:00
parent e362d2f3ee
commit a6830f8348
1 changed files with 1 additions and 1 deletions

View File

@ -53,9 +53,9 @@ type StepDownload struct {
} }
func (s *StepDownload) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { func (s *StepDownload) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
ui := state.Get("ui").(packer.Ui)
defer log.Printf("Leaving retrieve loop for %s", s.Description) defer log.Printf("Leaving retrieve loop for %s", s.Description)
ui := state.Get("ui").(packer.Ui)
ui.Say(fmt.Sprintf("Retrieving %s", s.Description)) ui.Say(fmt.Sprintf("Retrieving %s", s.Description))
var errs []error var errs []error