packer/rpc: Panic in error case

This commit is contained in:
Mitchell Hashimoto 2013-06-15 11:27:09 -07:00
parent 67eaa07cf4
commit a73e71c37f

View File

@ -93,8 +93,11 @@ func (e *Environment) Ui() packer.Ui {
var reply string
e.client.Call("Environment.Ui", new(interface{}), &reply)
// TODO: error handling
client, _ := rpc.Dial("tcp", reply)
client, err := rpc.Dial("tcp", reply)
if err != nil {
panic(err)
}
return &Ui{client}
}