diff --git a/config/config.yaml b/config/config.yml similarity index 100% rename from config/config.yaml rename to config/config.yml diff --git a/src/config.go b/src/config.go index adaf6b5..b2a89c9 100644 --- a/src/config.go +++ b/src/config.go @@ -26,10 +26,10 @@ func readConfig() { userConfigDir, _ := os.UserConfigDir() // Find valid config directory - if _, err := os.Stat(path.Join(userConfigDir, "stormfetch/config.yaml")); err == nil { - configPath = path.Join(userConfigDir, "stormfetch/config.yaml") - } else if _, err := os.Stat(path.Join(SystemConfigDir, "stormfetch/config.yaml")); err == nil { - configPath = path.Join(SystemConfigDir, "stormfetch/config.yaml") + if _, err := os.Stat(path.Join(userConfigDir, "stormfetch/config.yml")); err == nil { + configPath = path.Join(userConfigDir, "stormfetch/config.yml") + } else if _, err := os.Stat(path.Join(SystemConfigDir, "stormfetch/config.yml")); err == nil { + configPath = path.Join(SystemConfigDir, "stormfetch/config.yml") } else { log.Fatalf("Config file not found: %s", err.Error()) }