@@ -129,13 +129,6 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
129129 EnvVars : nil ,
130130 Value : nil ,
131131 },
132- & cli.StringFlag {
133- Name : common .FlagConfig ,
134- Aliases : []string {"c" },
135- Usage : `Path to config directory.` ,
136- EnvVars : []string {config .EnvKeyConfigDir },
137- Value : "" ,
138- },
139132 & cli.StringSliceFlag {
140133 Name : common .FlagDynamicConfigValue ,
141134 Usage : `Dynamic config value, as KEY=JSON_VALUE (string values need quotes).` ,
@@ -170,13 +163,6 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
170163 return cli .Exit (fmt .Sprintf ("bad value %q passed for flag %q" , c .String (common .FlagIP ), common .FlagIP ), 1 )
171164 }
172165
173- if c .IsSet (common .FlagConfig ) {
174- cfgPath := c .String (common .FlagConfig )
175- if _ , err := os .Stat (cfgPath ); os .IsNotExist (err ) {
176- return cli .Exit (fmt .Sprintf ("bad value %q passed for flag %q: file not found" , c .String (common .FlagConfig ), common .FlagConfig ), 1 )
177- }
178- }
179-
180166 return nil
181167 },
182168 Action : func (c * cli.Context ) error {
@@ -210,20 +196,6 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
210196 if err != nil {
211197 return err
212198 }
213-
214- baseConfig := & config.Config {}
215- if c .IsSet (common .FlagConfig ) {
216- // Temporal server requires a couple of persistence config values to
217- // be explicitly set or the config loading fails. While these are the
218- // same values used internally, they are overridden later anyways,
219- // they are just here to pass validation.
220- baseConfig .Persistence .DefaultStore = sconfig .PersistenceStoreName
221- baseConfig .Persistence .NumHistoryShards = 1
222- if err := config .Load ("temporal" , c .String (common .FlagConfig ), "" , & baseConfig ); err != nil {
223- return err
224- }
225- }
226-
227199 interruptChan := make (chan interface {}, 1 )
228200 go func () {
229201 if doneChan := c .Done (); doneChan != nil {
@@ -245,7 +217,7 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
245217 WithUpstreamOptions (
246218 temporal .InterruptOn (interruptChan ),
247219 ),
248- WithBaseConfig (baseConfig ),
220+ WithBaseConfig (& config. Config {} ),
249221 }
250222
251223 if c .IsSet (common .FlagDBPath ) {
@@ -267,11 +239,11 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
267239 },
268240 }
269241
270- opt , err := newUIOption (uiBaseCfg , c .String (common .FlagConfig ))
271-
242+ opt , err := newUIOption (uiBaseCfg )
272243 if err != nil {
273244 return err
274245 }
246+
275247 if opt != nil {
276248 opts = append (opts , opt )
277249 }
0 commit comments