change: get plugin path from funplugin

This commit is contained in:
debugtalk
2022-05-29 10:00:07 +08:00
parent 3d17bcecdf
commit 88f9d63a83
2 changed files with 6 additions and 7 deletions
+3 -5
View File
@@ -22,17 +22,15 @@ const (
projectInfoFile = "proj.json" // used for ensuring root project
)
func initPlugin(path string, logOn bool) (plugin funplugin.IPlugin, pluginDir string, err error) {
func initPlugin(path string, logOn bool) (plugin funplugin.IPlugin, err error) {
// plugin file not found
if path == "" {
return nil, "", nil
return nil, nil
}
pluginPath, err := locatePlugin(path)
if err != nil {
return nil, "", nil
return nil, nil
}
// TODO: move pluginDir to funplugin
pluginDir = filepath.Dir(pluginPath)
// found plugin file
plugin, err = funplugin.Init(pluginPath, funplugin.WithLogOn(logOn))