use pointer to config rather than config

This commit is contained in:
Megan Marsh 2019-12-19 11:21:51 -08:00
parent 5054b1becc
commit b23425f637
4 changed files with 4 additions and 4 deletions

View File

@ -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])

View File

@ -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))

View File

@ -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))

View File

@ -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))