From b23425f637748e200cd034e6e3498c2aa3853b6d Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 19 Dec 2019 11:21:51 -0800 Subject: [PATCH] use pointer to config rather than config --- post-processor/vagrant-cloud/post-processor.go | 2 +- post-processor/vagrant-cloud/step_create_version.go | 2 +- post-processor/vagrant-cloud/step_release_version.go | 2 +- post-processor/vagrant-cloud/step_verify_box.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/post-processor/vagrant-cloud/post-processor.go b/post-processor/vagrant-cloud/post-processor.go index 74a72d074..d6283e4e5 100644 --- a/post-processor/vagrant-cloud/post-processor.go +++ b/post-processor/vagrant-cloud/post-processor.go @@ -166,7 +166,7 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact // Set up the state state := new(multistep.BasicStateBag) - state.Put("config", p.config) + state.Put("config", &p.config) state.Put("client", p.client) state.Put("artifact", artifact) state.Put("artifactFilePath", artifact.Files()[0]) diff --git a/post-processor/vagrant-cloud/step_create_version.go b/post-processor/vagrant-cloud/step_create_version.go index 8c2459262..6830dc4a4 100644 --- a/post-processor/vagrant-cloud/step_create_version.go +++ b/post-processor/vagrant-cloud/step_create_version.go @@ -19,7 +19,7 @@ type stepCreateVersion struct { func (s *stepCreateVersion) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { client := state.Get("client").(*VagrantCloudClient) ui := state.Get("ui").(packer.Ui) - config := state.Get("config").(Config) + config := state.Get("config").(*Config) box := state.Get("box").(*Box) ui.Say(fmt.Sprintf("Creating version: %s", config.Version)) diff --git a/post-processor/vagrant-cloud/step_release_version.go b/post-processor/vagrant-cloud/step_release_version.go index ba3381a66..18ec9efd7 100644 --- a/post-processor/vagrant-cloud/step_release_version.go +++ b/post-processor/vagrant-cloud/step_release_version.go @@ -17,7 +17,7 @@ func (s *stepReleaseVersion) Run(ctx context.Context, state multistep.StateBag) ui := state.Get("ui").(packer.Ui) box := state.Get("box").(*Box) version := state.Get("version").(*Version) - config := state.Get("config").(Config) + config := state.Get("config").(*Config) ui.Say(fmt.Sprintf("Releasing version: %s", version.Version)) diff --git a/post-processor/vagrant-cloud/step_verify_box.go b/post-processor/vagrant-cloud/step_verify_box.go index 3580e44de..573815986 100644 --- a/post-processor/vagrant-cloud/step_verify_box.go +++ b/post-processor/vagrant-cloud/step_verify_box.go @@ -28,7 +28,7 @@ type stepVerifyBox struct { func (s *stepVerifyBox) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { client := state.Get("client").(*VagrantCloudClient) ui := state.Get("ui").(packer.Ui) - config := state.Get("config").(Config) + config := state.Get("config").(*Config) ui.Say(fmt.Sprintf("Verifying box is accessible: %s", config.Tag))