There was an error while loading. Please reload this page.
1 parent acefe2d commit a7f46b7Copy full SHA for a7f46b7
1 file changed
config/config.go
@@ -303,13 +303,8 @@ func New(cfgFile *string) (*Config, error) {
303
viper.SetConfigType("yaml") // config file format
304
305
if err := readConfig(cfgFile); err != nil {
306
- // If user explicitly provided a config file, fail hard on any error
307
- if cfgFile != nil && *cfgFile != "" {
308
- return nil, fmt.Errorf("failed to read config file: %w", err)
309
- }
310
- // Otherwise, only warn for non-file-not-found errors
311
if _, isNotFound := err.(viper.ConfigFileNotFoundError); !isNotFound {
312
- logger.Warn("failed to read config: %v", err)
+ return nil, fmt.Errorf("failed to read config file: %w", err)
313
}
314
315
0 commit comments