Make error reporting more robust to panic
This commit is contained in:
parent
21e3a08b0e
commit
e0c0acffeb
4 changed files with 30 additions and 15 deletions
|
|
@ -3,13 +3,17 @@ package app
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/apex/log"
|
||||
ooni "github.com/ooni/probe-cli"
|
||||
"github.com/ooni/probe-cli/internal/cli/root"
|
||||
)
|
||||
|
||||
// Run the app. This is the main app entry point
|
||||
func Run() error {
|
||||
func Run() {
|
||||
root.Cmd.Version(ooni.Version)
|
||||
_, err := root.Cmd.Parse(os.Args[1:])
|
||||
return err
|
||||
if err != nil {
|
||||
log.WithError(err).Error("failed to parse arguments")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue