mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-04 07:48:00 +08:00
Merge pull request #4070 from ipfs/feat/plugin/louder
plugin: make the info about non-executable file in plugins dir and Error log
This commit is contained in:
commit
88ad00360e
1
plugin/loader/.gitignore
vendored
1
plugin/loader/.gitignore
vendored
@ -1 +0,0 @@
|
||||
preload.go
|
||||
@ -1,7 +1,7 @@
|
||||
include mk/header.mk
|
||||
|
||||
$(d)/preload.go: d:=$(d)
|
||||
$(d)/preload.go: $(d)/preload_list
|
||||
$(d)/preload.go: $(d)/preload_list $(d)/preload.sh
|
||||
$(d)/preload.sh > $@
|
||||
go fmt $@ >/dev/null
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ func linuxLoadFunc(pluginDir string) ([]iplugin.Plugin, error) {
|
||||
// file is not executable let's not load it
|
||||
// this is to prevent loading plugins from for example non-executable
|
||||
// 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
|
||||
}
|
||||
|
||||
@ -56,7 +56,6 @@ func loadPlugin(fi string) ([]iplugin.Plugin, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Errorf("plugins: %T", pls)
|
||||
|
||||
typePls, ok := pls.(*[]iplugin.Plugin)
|
||||
if !ok {
|
||||
|
||||
7
plugin/loader/preload.go
Normal file
7
plugin/loader/preload.go
Normal file
@ -0,0 +1,7 @@
|
||||
package loader
|
||||
|
||||
import (
|
||||
"github.com/ipfs/go-ipfs/plugin"
|
||||
)
|
||||
|
||||
var preloadPlugins = []plugin.Plugin{}
|
||||
@ -20,6 +20,11 @@ done | sort -u
|
||||
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{
|
||||
EOL
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user