mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 17:36:38 +08:00
ipfs add should output hash to user
for now, ipfs add output format: added <hash> <path> ... (these commands will adhere to strict formats.)
This commit is contained in:

committed by
Brian Tiger Chow

parent
b053896e5f
commit
da20887e76
@ -99,7 +99,12 @@ func addNode(n *core.IpfsNode, nd *dag.Node, fpath string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
u.POut("added %s\n", fpath)
|
k, err := nd.Key()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
u.POut("added %s %s\n", k.Pretty(), fpath)
|
||||||
|
|
||||||
// ensure we keep it. atm no-op
|
// ensure we keep it. atm no-op
|
||||||
return n.PinDagNode(nd)
|
return n.PinDagNode(nd)
|
||||||
|
Reference in New Issue
Block a user