Make path and homedir related logic more robust

Add ability to pass OONI_HOME environment variable
This commit is contained in:
Arturo Filastò
2018-05-21 17:33:59 -07:00
parent e0ac7b337b
commit c620bc9726
5 changed files with 32 additions and 23 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import (
ooni "github.com/ooni/probe-cli"
"github.com/ooni/probe-cli/internal/log/handlers/batch"
"github.com/ooni/probe-cli/internal/log/handlers/cli"
"github.com/ooni/probe-cli/utils"
"github.com/prometheus/common/version"
)
@@ -38,7 +39,7 @@ func init() {
Init = func() (*ooni.Context, error) {
var err error
homePath, err := ooni.GetOONIHome()
homePath, err := utils.GetOONIHome()
if err != nil {
return nil, err
}