Skip to content

Commit

Permalink
Merge pull request #12709 from hashicorp/backport/update/missing_buil…
Browse files Browse the repository at this point in the history
…der_warning/reasonably-enjoyed-ray

This pull request was automerged via backport-assistant
  • Loading branch information
hc-github-team-packer authored Nov 23, 2023
2 parents 57fce6c + 334cfdf commit ebf057b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions acctest/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ func Test(t TestT, c TestCase) {
Components: packer.ComponentFinder{
PluginConfig: &packer.PluginConfig{
Builders: TestBuilderSet{
BuilderSet: packersdk.MapOfBuilder{
"test": func() (packersdk.Builder, error) { return c.Builder, nil },
},
StartFn: func(n string) (packersdk.Builder, error) {
if n == "test" {
return c.Builder, nil
Expand Down
2 changes: 1 addition & 1 deletion packer/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (c *Core) generateCoreBuildProvisioner(rawP *template.Provisioner, rawName
strings.Split(rawP.Type, "-")[0],
)

if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Builders.List()); sugg != "" {
if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Provisioners.List()); sugg != "" {
err = fmt.Errorf("Did you mean to use %q?", sugg)
}

Expand Down

0 comments on commit ebf057b

Please sign in to comment.