diff --git a/core/commands/dag/dag.go b/core/commands/dag/dag.go index 7f3b970be241..a78f67c065be 100644 --- a/core/commands/dag/dag.go +++ b/core/commands/dag/dag.go @@ -188,7 +188,7 @@ format. } out = final } - return res.Emit(&out) + return cmds.EmitOnce(res, &out) }, } @@ -219,7 +219,7 @@ var DagResolveCmd = &cmds.Command{ return err } - return res.Emit(&ResolveOutput{ + return cmds.EmitOnce(res, &ResolveOutput{ Cid: lastCid, RemPath: path.Join(rem), }) diff --git a/core/commands/dns.go b/core/commands/dns.go index f96ce9f57edc..ffc2dd159d3f 100644 --- a/core/commands/dns.go +++ b/core/commands/dns.go @@ -77,7 +77,7 @@ The resolver can recursively resolve: if err != nil { return err } - return res.Emit(&ncmd.ResolvedPath{Path: output}) + return cmds.EmitOnce(res, &ncmd.ResolvedPath{Path: output}) }, Encoders: cmds.EncoderMap{ cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *ncmd.ResolvedPath) error { diff --git a/core/commands/pin.go b/core/commands/pin.go index d1626c84407b..ba419e47964a 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -547,7 +547,7 @@ func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsN default: pinType = "indirect through " + pinType } - keys[c.String()] = RefKeyObject{ + keys[c.Cid().String()] = RefKeyObject{ Type: pinType, } }