Better error message when no config files found

This commit is contained in:
Nate Brown 2019-11-22 09:56:37 -08:00
parent 4f19e1830b
commit f65702a3b8
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,10 @@ func (c *Config) Load(path string) error {
return err
}
if len(c.files) == 0 {
return fmt.Errorf("no config files found at %s", path)
}
sort.Strings(c.files)
err = c.parse()