add proper error handling for tagging source instance

This commit is contained in:
Roman Zhuzha 2017-01-18 14:02:10 +01:00
parent ae016a1f25
commit d9186dc8cf
1 changed files with 4 additions and 2 deletions

View File

@ -302,8 +302,10 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
Resources: []*string{instance.InstanceId},
})
if err != nil {
ui.Message(
fmt.Sprintf("Failed to tag a Name on the builder instance: %s", err))
err := fmt.Errorf("Error tagging source instance: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
if s.Debug {