builder/amazon/instance: detect error bundling

This commit is contained in:
Mitchell Hashimoto 2013-07-24 15:44:58 -05:00
parent c1361b0cf5
commit 7763411914
1 changed files with 8 additions and 0 deletions

View File

@ -67,6 +67,14 @@ func (s *StepBundleVolume) Run(state map[string]interface{}) multistep.StepActio
return multistep.ActionHalt
}
if cmd.ExitStatus != 0 {
state["error"] = fmt.Errorf(
"Volume bundling failed. Please see the output above for more\n" +
"details on what went wrong.")
ui.Error(state["error"].(error).Error())
return multistep.ActionHalt
}
return multistep.ActionContinue
}