Skip to content

Commit

Permalink
reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Jan 5, 2023
1 parent 6fae305 commit 21450a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,13 @@ func (s *server) Start(ctx context.Context, req *rpcpb.StartRequest) (*rpcpb.Sta
if err := utils.CheckExecPath(req.GetExecPath()); err != nil {
return nil, err
}
pluginDir := filepath.Join(filepath.Dir(req.GetExecPath()), "plugins")
pluginDir := ""
if req.GetPluginDir() != "" {
pluginDir = req.GetPluginDir()
}
if pluginDir == "" {
pluginDir = filepath.Join(filepath.Dir(req.GetExecPath()), "plugins")
}
chainSpecs := []network.BlockchainSpec{}
if len(req.GetBlockchainSpecs()) > 0 {
s.log.Info("plugin-dir:", zap.String("plugin-dir", pluginDir))
Expand Down Expand Up @@ -328,7 +331,7 @@ func (s *server) Start(ctx context.Context, req *rpcpb.StartRequest) (*rpcpb.Sta
numNodes: numNodes,
whitelistedSubnets: whitelistedSubnets,
redirectNodesOutput: s.cfg.RedirectNodesOutput,
pluginDir: req.GetPluginDir(),
pluginDir: pluginDir,
globalNodeConfig: globalNodeConfig,
customNodeConfigs: customNodeConfigs,
chainConfigs: req.ChainConfigs,
Expand Down

0 comments on commit 21450a6

Please sign in to comment.