Fix: throw correct error in read config
This commit is contained in:
parent
a438900a2e
commit
45b938ea42
1 changed files with 2 additions and 2 deletions
|
@ -121,11 +121,11 @@ func readRawConfig(path string) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
path = path[:len(path)-5] + ".yml"
|
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 ioutil.ReadFile(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
return data, nil
|
return data, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func readConfig(path string) (*rawConfig, error) {
|
func readConfig(path string) (*rawConfig, error) {
|
||||||
|
|
Loading…
Reference in a new issue