提交 88ad0036 作者: Jeromy Johnson 提交者: GitHub

Merge pull request #4070 from ipfs/feat/plugin/louder

plugin: make the info about non-executable file in plugins dir and Error log
include mk/header.mk include mk/header.mk
$(d)/preload.go: d:=$(d) $(d)/preload.go: d:=$(d)
$(d)/preload.go: $(d)/preload_list $(d)/preload.go: $(d)/preload_list $(d)/preload.sh
$(d)/preload.sh > $@ $(d)/preload.sh > $@
go fmt $@ >/dev/null go fmt $@ >/dev/null
......
...@@ -32,7 +32,7 @@ func linuxLoadFunc(pluginDir string) ([]iplugin.Plugin, error) { ...@@ -32,7 +32,7 @@ func linuxLoadFunc(pluginDir string) ([]iplugin.Plugin, error) {
// file is not executable let's not load it // file is not executable let's not load it
// this is to prevent loading plugins from for example non-executable // this is to prevent loading plugins from for example non-executable
// mounts, some /tmp mounts are marked as such for security // mounts, some /tmp mounts are marked as such for security
log.Warningf("non-executable file in plugins directory: %s", fi) log.Errorf("non-executable file in plugins directory: %s", fi)
return nil return nil
} }
...@@ -56,7 +56,6 @@ func loadPlugin(fi string) ([]iplugin.Plugin, error) { ...@@ -56,7 +56,6 @@ func loadPlugin(fi string) ([]iplugin.Plugin, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
log.Errorf("plugins: %T", pls)
typePls, ok := pls.(*[]iplugin.Plugin) typePls, ok := pls.(*[]iplugin.Plugin)
if !ok { if !ok {
......
package loader
import (
"github.com/ipfs/go-ipfs/plugin"
)
var preloadPlugins = []plugin.Plugin{}
...@@ -20,6 +20,11 @@ done | sort -u ...@@ -20,6 +20,11 @@ done | sort -u
cat <<EOL cat <<EOL
) )
// DO NOT EDIT THIS FILE
// This file is being generated as part of plugin build process
// To change it, modify the plugin/loader/preload.sh
var preloadPlugins = []plugin.Plugin{ var preloadPlugins = []plugin.Plugin{
EOL EOL
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论