2018-02-07 19:02:18 +01:00
|
|
|
package info
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/alecthomas/kingpin"
|
2018-02-21 16:06:30 +01:00
|
|
|
"github.com/apex/log"
|
2018-05-03 14:59:55 +02:00
|
|
|
"github.com/ooni/probe-cli/internal/cli/root"
|
2018-02-07 19:02:18 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
cmd := root.Command("info", "Display information about OONI Probe")
|
|
|
|
|
|
|
|
cmd.Action(func(_ *kingpin.ParseContext) error {
|
2018-09-10 15:15:29 +02:00
|
|
|
ctx, err := root.Init()
|
|
|
|
if err != nil {
|
|
|
|
log.Errorf("%s", err)
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
log.WithFields(log.Fields{
|
|
|
|
"path": ctx.Home,
|
|
|
|
}).Info("Home")
|
|
|
|
log.WithFields(log.Fields{
|
|
|
|
"path": ctx.TempDir,
|
|
|
|
}).Info("TempDir")
|
|
|
|
|
2018-02-07 19:02:18 +01:00
|
|
|
return nil
|
|
|
|
})
|
|
|
|
}
|