Commit 2e1b69ad authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/rpc: Environment.PostProcessor() properly sets thigns up

parent 76ab8709
...@@ -80,12 +80,12 @@ func (e *Environment) PostProcessor(name string) (p packer.PostProcessor, err er ...@@ -80,12 +80,12 @@ func (e *Environment) PostProcessor(name string) (p packer.PostProcessor, err er
return return
} }
_, err = rpc.Dial("tcp", reply) client, err := rpc.Dial("tcp", reply)
if err != nil { if err != nil {
return return
} }
p = nil p = PostProcessor(client)
return return
} }
...@@ -160,12 +160,13 @@ func (e *EnvironmentServer) Hook(name *string, reply *string) error { ...@@ -160,12 +160,13 @@ func (e *EnvironmentServer) Hook(name *string, reply *string) error {
} }
func (e *EnvironmentServer) PostProcessor(name *string, reply *string) error { func (e *EnvironmentServer) PostProcessor(name *string, reply *string) error {
_, err := e.env.PostProcessor(*name) pp, err := e.env.PostProcessor(*name)
if err != nil { if err != nil {
return err return err
} }
server := rpc.NewServer() server := rpc.NewServer()
RegisterPostProcessor(server, pp)
*reply = serveSingleConn(server) *reply = serveSingleConn(server)
return nil return nil
......
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