From 8b6931cb02b7f51e6e026adb908fc0463b4581ec Mon Sep 17 00:00:00 2001 From: Brian Tiger Chow Date: Thu, 6 Nov 2014 03:41:19 -0800 Subject: [PATCH] check mode with use func node.OnlineMode() bool --- core/commands2/diag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/commands2/diag.go b/core/commands2/diag.go index 197cfd130..f265c2a8d 100644 --- a/core/commands2/diag.go +++ b/core/commands2/diag.go @@ -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 }