From 7151f4270f19e8d22b16e66d8c1e33afe4064e71 Mon Sep 17 00:00:00 2001 From: Will Scott Date: Thu, 8 Mar 2018 02:33:27 -0800 Subject: [PATCH] config default path / writing / onboarding occurs --- ooni.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ooni.go b/ooni.go index e8b20c4..3fb6534 100644 --- a/ooni.go +++ b/ooni.go @@ -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 }