check mode with use func node.OnlineMode() bool
Brian Tiger Chow committed
Nov 6, 2014 at 03:41 UTC
8b6931cb02b7f51e6e026adb908fc0463b4581ec
1 file changed
+1
-1
core/commands2/diag.go
+1
-1
@@ -31,7 +31,7 @@ var diagCmd = &cmds.Command{
31
Run: func(res cmds.Response, req cmds.Request) {
32
n := req.Context().Node
33
34
- if n.Diagnostics == nil {
34
+ if !n.Online() {
35
res.SetError(errors.New("Cannot run diagnostic in offline mode!"), cmds.ErrNormal)
36
return
37
}