Merge pull request #28 from slackhq/no-config

Better error message when no config files found
This commit is contained in:
Nathan Brown 2019-11-22 09:59:34 -08:00 committed by GitHub
commit 6412e10d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()