From a67948f1556a6ddb743f0c2e36548ae8372dec99 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Thu, 19 Dec 2019 17:01:55 +0100 Subject: [PATCH] fix config pointers --- builder/cloudstack/builder.go | 2 +- builder/linode/builder.go | 2 +- builder/lxc/builder.go | 2 +- builder/lxd/builder.go | 2 +- builder/null/builder.go | 1 - builder/oneandone/builder.go | 2 +- builder/oracle/classic/builder.go | 2 +- builder/oracle/oci/builder.go | 2 +- builder/parallels/pvm/builder.go | 2 +- builder/profitbricks/builder.go | 2 +- builder/scaleway/builder.go | 2 +- builder/vagrant/builder.go | 2 +- builder/virtualbox/ovf/builder.go | 2 +- builder/virtualbox/vm/builder.go | 2 +- builder/vmware/vmx/builder.go | 2 +- 15 files changed, 14 insertions(+), 15 deletions(-) diff --git a/builder/cloudstack/builder.go b/builder/cloudstack/builder.go index 9a92a41da..7255a057b 100644 --- a/builder/cloudstack/builder.go +++ b/builder/cloudstack/builder.go @@ -53,7 +53,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Set up the state. state := new(multistep.BasicStateBag) state.Put("client", client) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("hook", hook) state.Put("ui", ui) diff --git a/builder/linode/builder.go b/builder/linode/builder.go index 95504219f..e4638eb41 100644 --- a/builder/linode/builder.go +++ b/builder/linode/builder.go @@ -47,7 +47,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (ret } state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("hook", hook) state.Put("ui", ui) diff --git a/builder/lxc/builder.go b/builder/lxc/builder.go index 9c628b4b1..0d313c7b9 100644 --- a/builder/lxc/builder.go +++ b/builder/lxc/builder.go @@ -53,7 +53,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Setup the state bag state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("hook", hook) state.Put("ui", ui) state.Put("wrappedCommand", CommandWrapper(wrappedCommand)) diff --git a/builder/lxd/builder.go b/builder/lxd/builder.go index f3b3f3e57..4cc58d8a4 100644 --- a/builder/lxd/builder.go +++ b/builder/lxd/builder.go @@ -47,7 +47,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Setup the state bag state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("hook", hook) state.Put("ui", ui) state.Put("wrappedCommand", CommandWrapper(wrappedCommand)) diff --git a/builder/null/builder.go b/builder/null/builder.go index 3ad24150e..e0568ce05 100644 --- a/builder/null/builder.go +++ b/builder/null/builder.go @@ -45,7 +45,6 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Setup the state bag and initial state for the steps state := new(multistep.BasicStateBag) - state.Put("config", b.config) state.Put("hook", hook) state.Put("ui", ui) diff --git a/builder/oneandone/builder.go b/builder/oneandone/builder.go index d30b930b8..9ad5a643c 100644 --- a/builder/oneandone/builder.go +++ b/builder/oneandone/builder.go @@ -34,7 +34,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("hook", hook) state.Put("ui", ui) diff --git a/builder/oracle/classic/builder.go b/builder/oracle/classic/builder.go index 921150d98..466db5324 100644 --- a/builder/oracle/classic/builder.go +++ b/builder/oracle/classic/builder.go @@ -67,7 +67,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack runID := fmt.Sprintf("%s_%s", b.config.ImageName, os.Getenv("PACKER_RUN_UUID")) // Populate the state bag state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("hook", hook) state.Put("ui", ui) state.Put("client", client) diff --git a/builder/oracle/oci/builder.go b/builder/oracle/oci/builder.go index 255fc5808..2fe35ebc1 100644 --- a/builder/oracle/oci/builder.go +++ b/builder/oracle/oci/builder.go @@ -46,7 +46,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Populate the state bag state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("driver", driver) state.Put("hook", hook) state.Put("ui", ui) diff --git a/builder/parallels/pvm/builder.go b/builder/parallels/pvm/builder.go index b66329073..bcecbcb02 100644 --- a/builder/parallels/pvm/builder.go +++ b/builder/parallels/pvm/builder.go @@ -42,7 +42,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Set up the state. state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("debug", b.config.PackerDebug) state.Put("driver", driver) state.Put("hook", hook) diff --git a/builder/profitbricks/builder.go b/builder/profitbricks/builder.go index 87ff324da..99666cd58 100644 --- a/builder/profitbricks/builder.go +++ b/builder/profitbricks/builder.go @@ -32,7 +32,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) { func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (packer.Artifact, error) { state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("hook", hook) state.Put("ui", ui) steps := []multistep.Step{ diff --git a/builder/scaleway/builder.go b/builder/scaleway/builder.go index 6d9e7a209..ac5f47561 100644 --- a/builder/scaleway/builder.go +++ b/builder/scaleway/builder.go @@ -44,7 +44,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack } state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("client", client) state.Put("hook", hook) state.Put("ui", ui) diff --git a/builder/vagrant/builder.go b/builder/vagrant/builder.go index f0bf3ab16..198cc753d 100644 --- a/builder/vagrant/builder.go +++ b/builder/vagrant/builder.go @@ -237,7 +237,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Set up the state. state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("debug", b.config.PackerDebug) state.Put("driver", driver) state.Put("hook", hook) diff --git a/builder/virtualbox/ovf/builder.go b/builder/virtualbox/ovf/builder.go index 9fdb7b189..d1db85944 100644 --- a/builder/virtualbox/ovf/builder.go +++ b/builder/virtualbox/ovf/builder.go @@ -42,7 +42,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Set up the state. state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("debug", b.config.PackerDebug) state.Put("driver", driver) state.Put("hook", hook) diff --git a/builder/virtualbox/vm/builder.go b/builder/virtualbox/vm/builder.go index be24f8a6e..9ec83cb8d 100644 --- a/builder/virtualbox/vm/builder.go +++ b/builder/virtualbox/vm/builder.go @@ -42,7 +42,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Set up the state. state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("debug", b.config.PackerDebug) state.Put("driver", driver) state.Put("hook", hook) diff --git a/builder/vmware/vmx/builder.go b/builder/vmware/vmx/builder.go index 1b5d1f685..31fa0e09f 100644 --- a/builder/vmware/vmx/builder.go +++ b/builder/vmware/vmx/builder.go @@ -61,7 +61,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack // Set up the state. state := new(multistep.BasicStateBag) - state.Put("config", b.config) + state.Put("config", &b.config) state.Put("debug", b.config.PackerDebug) state.Put("dir", dir) state.Put("driver", driver)