فهرست منبع

Merge pull request #39422 from lemrouch/35876-workaround

Don't try to load plugin without name
Brian Goff 6 سال پیش
والد
کامیت
e6091b28c5
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  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.
 func Get(name, imp string) (*Plugin, error) {
+	if name == "" {
+		return nil, errors.New("Unable to find plugin without name")
+	}
 	pl, err := get(name)
 	if err != nil {
 		return nil, err