Commit 808cf9df authored by Jeromy's avatar Jeromy

fail with error when running diagnostic in offline mode

parent 5c14df0a
......@@ -2,6 +2,7 @@ package commands
import (
"encoding/json"
"errors"
"io"
"time"
......@@ -9,6 +10,9 @@ import (
)
func Diag(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error {
if n.Diagnostics == nil {
return errors.New("Cannot run diagnostic in offline mode!")
}
info, err := n.Diagnostics.GetDiagnostic(time.Second * 20)
if err != nil {
return err
......
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