From dd10cb3dccab8b5c254c81b2b3a69e31a2149539 Mon Sep 17 00:00:00 2001 From: axtloss Date: Sat, 6 Jan 2024 17:51:41 +0100 Subject: [PATCH] fix: stop calling plugin twice --- core/plugins.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/plugins.go b/core/plugins.go index dafe7b8..86dfb36 100644 --- a/core/plugins.go +++ b/core/plugins.go @@ -9,9 +9,9 @@ import ( var openedPlugins map[string]Plugin func LoadPlugin(name string, module interface{}, recipe *api.Recipe) (string, error) { - if openedPlugins == nil { - openedPlugins = make(map[string]Plugin) - } + if openedPlugins == nil { + openedPlugins = make(map[string]Plugin) + } pluginOpened := false var buildModule Plugin buildModule, pluginOpened = openedPlugins[name] @@ -33,6 +33,5 @@ func LoadPlugin(name string, module interface{}, recipe *api.Recipe) (string, er openedPlugins[name] = buildModule } fmt.Printf("Using plugin: %s\n", buildModule.Name) - fmt.Println(buildModule.BuildFunc(module, recipe)) return buildModule.BuildFunc(module, recipe) }