1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 17:03:58 +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:
Juan Batiz-Benet
2014-09-20 07:24:49 -07:00
committed by Brian Tiger Chow
parent b053896e5f
commit da20887e76

View File

@ -99,7 +99,12 @@ func addNode(n *core.IpfsNode, nd *dag.Node, fpath string) error {
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
return n.PinDagNode(nd)