Commit 8b6931cb authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

check mode with use func node.OnlineMode() bool

parent 772f657f
......@@ -31,7 +31,7 @@ var diagCmd = &cmds.Command{
Run: func(res cmds.Response, req cmds.Request) {
n := req.Context().Node
if n.Diagnostics == nil {
if !n.Online() {
res.SetError(errors.New("Cannot run diagnostic in offline mode!"), cmds.ErrNormal)
return
}
......
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