Fix: don't read yml if not exist (#253)
This commit is contained in:
parent
528fbd10e4
commit
288afd1308
@ -106,7 +106,11 @@ func readRawConfig(path string) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
path = path[:len(path)-5] + ".yml"
|
path = path[:len(path)-5] + ".yml"
|
||||||
return ioutil.ReadFile(path)
|
if _, err = os.Stat(path); err == nil {
|
||||||
|
return ioutil.ReadFile(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
return data, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func readConfig(path string) (*rawConfig, error) {
|
func readConfig(path string) (*rawConfig, error) {
|
||||||
|
Reference in New Issue
Block a user