@cryptotaxi247 / kubo / commits / da20887e7

ipfs add should output hash to user

for now, ipfs add output format: added <hash> <path> ... (these commands will adhere to strict formats.)

Juan Batiz-Benet committed Sep 20, 2014 at 07:24 UTC da20887e7641c521aadb977bd0b73e9bb08e7a11
1 file changed +6 -1
core/commands/add.go
+6 -1
@@ -99,7 +99,12 @@ func addNode(n *core.IpfsNode, nd *dag.Node, fpath string) error {
99 return err
100 }
101
102 - u.POut("added %s\n", fpath)
102 + k, err := nd.Key()
103 + if err != nil {
104 + return err
105 + }
106 +
107 + u.POut("added %s %s\n", k.Pretty(), fpath)
108
109 // ensure we keep it. atm no-op
110 return n.PinDagNode(nd)