diff --git a/.drone.yml b/.drone.yml index 04f59a2..df3b1e5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,7 @@ pipeline: commands: - go get -v -d ./... - sh build_plugins.sh - - go test ./... + - go test . ./commands ./settings ./plugin_manager/ ./shared/ publish: image: plugins/docker repo: klmp200/alfred diff --git a/plugin_manager/manager.go b/plugin_manager/manager.go index d4371ae..c76dda8 100644 --- a/plugin_manager/manager.go +++ b/plugin_manager/manager.go @@ -7,6 +7,7 @@ package plugin_manager import ( tb "gopkg.in/tucnak/telebot.v2" "log" + "path/filepath" "strings" "sync" ) @@ -30,7 +31,7 @@ func Init(_pluginDir string, bot *tb.Bot) { context = bot for _, fileName := range GetSoFiles(pluginDir) { var p PluginCtrl - p.plugin = LoadSoFile(pluginDir + "/" + fileName) + p.plugin = LoadSoFile(filepath.Join(pluginDir, fileName)) if p.plugin != nil { p.running = false p.enable = true