Skip to content

Commit

Permalink
Make non recursive resolve print the result
Browse files Browse the repository at this point in the history
Currently it prints out error message but should just print
the intermediate result as it is what we expect.

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@gmail.com>
  • Loading branch information
Kubuxu committed Feb 2, 2016
1 parent 62ba5eb commit 8bd6889
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/commands/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 "github.com/ipfs/go-ipfs/util"
)
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 8bd6889

Please sign in to comment.