From 016b8dcc4c784f3c1288fdbe8e4bceaa8bf34ebd Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Tue, 28 Jan 2020 23:49:51 -0500 Subject: [PATCH] Do not add non-plugin directories in plug/ --- internal/config/rtfiles.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/config/rtfiles.go b/internal/config/rtfiles.go index 98d27dd3..6070e4eb 100644 --- a/internal/config/rtfiles.go +++ b/internal/config/rtfiles.go @@ -186,8 +186,8 @@ func InitRuntimeFiles() { } } - if !isID(p.Name) { - log.Println("Invalid plugin name", p.Name) + if !isID(p.Name) || len(p.Srcs) <= 0 { + log.Println(p.Name, "is not a plugin") continue } Plugins = append(Plugins, p) @@ -214,8 +214,8 @@ func InitRuntimeFiles() { p.Name = p.Info.Name } } - if !isID(p.Name) { - log.Println("Invalid plugin name", p.Name) + if !isID(p.Name) || len(p.Srcs) <= 0 { + log.Println(p.Name, "is not a plugin") continue } Plugins = append(Plugins, p)