ignore viper config not found error
@@ -268,9 +268,11 @@ func (c *Config) Load(ctx context.Context) error {
c.FileConfig.SetConfigName(configName)
err = c.FileConfig.ReadInConfig()
if err != nil {
+ if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
return err
}
}
+ }
err := c.FileConfig.Unmarshal(c)
if err != nil {
