config default path / writing / onboarding occurs

This commit is contained in:
Will Scott 2018-03-08 02:33:27 -08:00
parent 8d5da14c4b
commit 7151f4270f

View File

@ -26,6 +26,7 @@ func Onboarding(c *Config) error {
c.Unlock()
if err := c.Write(); err != nil {
log.Warnf("Failed to save informed consent: %v", err)
return err
}
return nil
@ -113,6 +114,11 @@ func (c *Config) Unlock() {
// Default config settings
func (c *Config) Default() error {
home, err := GetOONIHome()
if err != nil {
return err
}
c.path = filepath.Join(home, "config.json")
return nil
}