Commit e8a49d94 authored by Jakub Sztandera's avatar Jakub Sztandera Committed by Jakub Sztandera

Make non recursive resolve print the result

Currently it prints out error message but should just print
the intermediate result as it is what we expect.

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@gmail.com>
parent b0a613fd
......@@ -6,6 +6,7 @@ import (
cmds "github.com/ipfs/go-ipfs/commands"
"github.com/ipfs/go-ipfs/core"
ns "github.com/ipfs/go-ipfs/namesys"
path "github.com/ipfs/go-ipfs/path"
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
)
......@@ -82,7 +83,8 @@ Resolve the value of an IPFS DAG path:
// the case when ipns is resolved step by step
if strings.HasPrefix(name, "/ipns/") && !recursive {
p, err := n.Namesys.ResolveN(req.Context(), name, 1)
if err != nil {
// ErrResolveRecursion is fine
if err != nil && err != ns.ErrResolveRecursion {
res.SetError(err, 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