mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-19 01:39:35 +08:00
display key if BlockPut is successful
This commit is contained in:
@ -45,8 +45,11 @@ func BlockPut(n *core.IpfsNode, args []string, opts map[string]interface{}, out
|
||||
b := blocks.NewBlock(data)
|
||||
log.Debug("BlockPut key: '%q'", b.Key())
|
||||
|
||||
_, err = n.Blocks.AddBlock(b)
|
||||
log.Debug("BlockPut Done. Err: %q", err)
|
||||
k, err := n.Blocks.AddBlock(b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Fprintf(out, "added as '%s'\n", k)
|
||||
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user