From 4fa86bd3b505ecab4dd2813896c84077d435e182 Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Fri, 7 Jun 2024 19:20:30 +0800 Subject: [PATCH] fix: config read --- pkg/common/cmd/push.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/common/cmd/push.go b/pkg/common/cmd/push.go index 4b8cf7b6f4..89bfbf4d29 100644 --- a/pkg/common/cmd/push.go +++ b/pkg/common/cmd/push.go @@ -19,7 +19,6 @@ import ( "github.com/openimsdk/open-im-server/v3/internal/push" "github.com/openimsdk/open-im-server/v3/pkg/common/config" "github.com/openimsdk/open-im-server/v3/pkg/common/startrpc" - "github.com/openimsdk/tools/system/program" "github.com/spf13/cobra" ) @@ -44,10 +43,9 @@ func NewPushRpcCmd() *PushRpcCmd { LocalCacheConfigFileName: &pushConfig.LocalCacheConfig, DiscoveryConfigFilename: &pushConfig.Discovery, } - ret.pushConfig.FcmConfigPath = ret.ConfigPath() ret.ctx = context.WithValue(context.Background(), "version", config.Version) ret.Command.RunE = func(cmd *cobra.Command, args []string) error { - ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap)) + ret.pushConfig.FcmConfigPath = ret.ConfigPath() return ret.runE() } return ret