From feb6ccc72b3f05f7661d3aadadedf6f2ac6d7060 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Thu, 29 Jun 2023 16:12:47 +0800 Subject: [PATCH] nits --- cmd/geth/main.go | 4 ++-- cmd/utils/flags.go | 3 ++- plugins/plugin_loader.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 4e6ba7b56..f8b90d1b7 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -20,7 +20,7 @@ package geth import ( "fmt" "os" - "path" + "path/filepath" "sort" "strconv" "strings" @@ -346,7 +346,7 @@ func geth(ctx *cli.Context) error { if ctx.IsSet(utils.PluginsDirFlag.Name) { pluginsDir = ctx.String(utils.PluginsDirFlag.Name) } else { - pluginsDir = path.Join(ctx.String(utils.DataDirFlag.Name), "plugins") + pluginsDir = filepath.Join(ctx.String(utils.DataDirFlag.Name), "plugins") } if err := plugins.Initialize(pluginsDir, ctx); err != nil { diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 62bef192d..6f34cec40 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -91,7 +91,8 @@ var ( //begin PluGeth code injection PluginsDirFlag = &flags.DirectoryFlag{ Name: "pluginsdir", - Usage: "Directory for plugins (default = datadir/plugins)", + Usage: "Directory for plugins", + Value: flags.DirectoryString(filepath.Join("", "plugins")), Category: flags.EthCategory, } //end PluGeth code injection diff --git a/plugins/plugin_loader.go b/plugins/plugin_loader.go index 1e059d9bb..dfb4af030 100644 --- a/plugins/plugin_loader.go +++ b/plugins/plugin_loader.go @@ -58,7 +58,7 @@ func Lookup(name string, validate func(interface{}) bool) []interface{} { var DefaultPluginLoader *PluginLoader func NewPluginLoader(target string) (*PluginLoader, error) { - log.Info("Loading plugins from directory.", "path", target) + log.Info("Loading plugins from directory", "path", target) pl := &PluginLoader{ Plugins: []pluginDetails{}, Subcommands: make(map[string]Subcommand),