Commit 2473d2d7 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

refactor(ipfs2/main) same for debug

parent 28be8a61
......@@ -134,13 +134,15 @@ func handleOptions(req cmds.Request, root *cmds.Command) {
exit(0)
}
if debug, err := req.Option("debug").Bool(); debug && err == nil {
u.Debug = true
u.SetAllLoggers(logging.DEBUG)
} else if err != nil {
debug, err := req.Option("debug").Bool()
if err != nil {
fmt.Println(err)
exit(1)
}
if debug {
u.Debug = true
u.SetAllLoggers(logging.DEBUG)
}
}
func callCommand(req cmds.Request, root *cmds.Command) cmds.Response {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment