Skip to content

Commit a49f047

Browse files
author
Wilken Rivera
authored
Fix plugin-check cmd for provisioner only plugins (#88)
Before change ``` ~> packer-sdc plugin-check packer-plugin-puppet 2021/11/11 14:06:49 this plugin defines no component. ``` After Change ``` ~> packer-sdc plugin-check packer-plugin-puppet && echo $? 0 ```
1 parent fe59092 commit a49f047

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## `plugin-check`
22

3-
`plugin-check` will check wether a plugin binary seems to work with packer.
3+
`plugin-check` will check whether a plugin binary seems to work with packer.
44

55
Use: `packer-sdc plugin-check packer-plugin-happy-cloud`

cmd/packer-sdc/internal/plugincheck/cmd.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (cmd *Command) run(args []string) error {
7979
return errors.New("APIVersion needs to be set")
8080
}
8181

82-
if len(desc.Builders) == 0 && len(desc.PostProcessors) == 0 && len(desc.Datasources) == 0 {
82+
if len(desc.Builders) == 0 && len(desc.PostProcessors) == 0 && len(desc.Datasources) == 0 && len(desc.Provisioners) == 0 {
8383
return errors.New("this plugin defines no component.")
8484
}
8585
return nil
@@ -92,6 +92,7 @@ type pluginDescription struct {
9292
Builders []string `json:"builders"`
9393
PostProcessors []string `json:"post_processors"`
9494
Datasources []string `json:"datasources"`
95+
Provisioners []string `json:"provisioners"`
9596
}
9697

9798
func isOldPlugin(pluginName string) bool {

0 commit comments

Comments
 (0)