Commit c0235886 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: error checking on upload path template

parent 8bb5d405
......@@ -33,6 +33,13 @@ func (*stepUploadTools) Run(state map[string]interface{}) multistep.StepAction {
tplData := &toolsUploadPathTemplate{Flavor: config.ToolsUploadFlavor}
config.ToolsUploadPath, err = config.tpl.Process(config.ToolsUploadPath, tplData)
if err != nil {
err := fmt.Errorf("Error preparing upload path: %s", err)
state["error"] = err
ui.Error(err.Error())
return multistep.ActionHalt
}
if err := comm.Upload(config.ToolsUploadPath, f); err != nil {
state["error"] = fmt.Errorf("Error uploading VMware Tools: %s", err)
return multistep.ActionHalt
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment