diff --git a/config/config.go b/config/config.go index 3f4da5aa8..1e5ab5fc6 100644 --- a/config/config.go +++ b/config/config.go @@ -121,11 +121,11 @@ func readRawConfig(path string) ([]byte, error) { } path = path[:len(path)-5] + ".yml" - if _, err = os.Stat(path); err == nil { + if _, fallbackErr := os.Stat(path); fallbackErr == nil { return ioutil.ReadFile(path) } - return data, nil + return data, err } func readConfig(path string) (*rawConfig, error) {