fix startup with -dev and -config (#2442)

This commit is contained in:
Paul Wells
2024-02-03 14:57:07 -08:00
committed by GitHub
parent f26fbceaba
commit 4bce0e7ed4
2 changed files with 6 additions and 15 deletions
+4 -4
View File
@@ -516,16 +516,16 @@ func NewConfig(confString string, strictMode bool, c *cli.Context, baseFlags []c
}
}
if err := conf.RTC.Validate(conf.Development); err != nil {
return nil, fmt.Errorf("could not validate RTC config: %v", err)
}
if c != nil {
if err := conf.updateFromCLI(c, baseFlags); err != nil {
return nil, err
}
}
if err := conf.RTC.Validate(conf.Development); err != nil {
return nil, fmt.Errorf("could not validate RTC config: %v", err)
}
// expand env vars in filenames
file, err := homedir.Expand(os.ExpandEnv(conf.KeyFile))
if err != nil {