Initial creation of the '.ooni/db' folders when not yet setup

This commit is contained in:
Will Scott 2018-03-08 02:25:40 -08:00
commit 8d5da14c4b
2 changed files with 24 additions and 6 deletions

View file

@ -154,6 +154,8 @@ func ReadConfig(path string) (*Config, error) {
if err = c.Validate(); err != nil {
return nil, errors.Wrap(err, "validating")
}
return c, nil
}
if err != nil {
@ -186,5 +188,7 @@ func ReadDefaultConfigPaths() (*Config, error) {
return c, nil
}
}
return nil, errors.New("failed to find a config")
// Run from the default config
return ReadConfig(paths[0])
}