Browse Source

Merge pull request #39422 from lemrouch/35876-workaround

Don't try to load plugin without name
Brian Goff 6 năm trước cách đây
mục cha
commit
e6091b28c5
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      pkg/plugins/plugins.go

+ 3 - 0
pkg/plugins/plugins.go

@@ -254,6 +254,9 @@ func get(name string) (*Plugin, error) {
 
 
 // Get returns the plugin given the specified name and requested implementation.
 // Get returns the plugin given the specified name and requested implementation.
 func Get(name, imp string) (*Plugin, error) {
 func Get(name, imp string) (*Plugin, error) {
+	if name == "" {
+		return nil, errors.New("Unable to find plugin without name")
+	}
 	pl, err := get(name)
 	pl, err := get(name)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err