fix: config read

pull/2336/head
icey-yu 1 year ago
parent 7065b5f81b
commit 0ef42b1896

@ -44,10 +44,10 @@ func NewPushRpcCmd() *PushRpcCmd {
LocalCacheConfigFileName: &pushConfig.LocalCacheConfig, LocalCacheConfigFileName: &pushConfig.LocalCacheConfig,
DiscoveryConfigFilename: &pushConfig.Discovery, DiscoveryConfigFilename: &pushConfig.Discovery,
} }
ret.pushConfig.FcmPath = ret.ConfigPath() ret.pushConfig.FcmConfigPath = ret.ConfigPath()
ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap))
ret.ctx = context.WithValue(context.Background(), "version", config.Version) ret.ctx = context.WithValue(context.Background(), "version", config.Version)
ret.Command.RunE = func(cmd *cobra.Command, args []string) error { ret.Command.RunE = func(cmd *cobra.Command, args []string) error {
ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap))
return ret.runE() return ret.runE()
} }
return ret return ret

Loading…
Cancel
Save