mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-09 18:28:08 +08:00
refactor(ipfs2/main) same for debug
This commit is contained in:
parent
28be8a6171
commit
2473d2d720
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user