From 338298b8aff1e70ceafd0f9e9131a928e559f268 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 18 Jun 2013 16:29:29 -0700 Subject: [PATCH] command/build, command/validate: Setup proper components to avoid nil --- command/build/command.go | 7 ++++--- command/validate/commang.go | 7 ++++--- packer/rpc/post_processor.go | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/command/build/command.go b/command/build/command.go index 871f9b207..94b895671 100644 --- a/command/build/command.go +++ b/command/build/command.go @@ -63,9 +63,10 @@ func (c Command) Run(env packer.Environment, args []string) int { // The component finder for our builds components := &packer.ComponentFinder{ - Builder: env.Builder, - Hook: env.Hook, - Provisioner: env.Provisioner, + Builder: env.Builder, + Hook: env.Hook, + PostProcessor: env.PostProcessor, + Provisioner: env.Provisioner, } // Go through each builder and compile the builds that we care about diff --git a/command/validate/commang.go b/command/validate/commang.go index 8c65fd62b..96f6fb176 100644 --- a/command/validate/commang.go +++ b/command/validate/commang.go @@ -56,9 +56,10 @@ func (c Command) Run(env packer.Environment, args []string) int { // The component finder for our builds components := &packer.ComponentFinder{ - Builder: env.Builder, - Hook: env.Hook, - Provisioner: env.Provisioner, + Builder: env.Builder, + Hook: env.Hook, + PostProcessor: env.PostProcessor, + Provisioner: env.Provisioner, } // Otherwise, get all the builds diff --git a/packer/rpc/post_processor.go b/packer/rpc/post_processor.go index 67750b82b..bec37a9c4 100644 --- a/packer/rpc/post_processor.go +++ b/packer/rpc/post_processor.go @@ -18,7 +18,7 @@ type PostProcessorServer struct { } type PostProcessorProcessResponse struct { - Err error + Err error RPCAddress string } @@ -83,7 +83,7 @@ func (p *PostProcessorServer) PostProcess(address string, reply *PostProcessorPr } *reply = PostProcessorProcessResponse{ - Err: err, + Err: err, RPCAddress: responseAddress, }