1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 01:12:24 +08:00

Fix key rename command output error

License: MIT
Signed-off-by: Xiaoyi Wang <wangxiaoyi@hyperchain.cn>
This commit is contained in:
Xiaoyi Wang
2018-04-22 11:45:37 +08:00
parent 8b383da27a
commit b7ce80c0f5

View File

@ -306,7 +306,11 @@ var keyRenameCmd = &cmds.Command{
},
Marshalers: cmds.MarshalerMap{
cmds.Text: func(res cmds.Response) (io.Reader, error) {
k, ok := res.Output().(*KeyRenameOutput)
v, err := unwrapOutput(res.Output())
if err != nil {
return nil, err
}
k, ok := v.(*KeyRenameOutput)
if !ok {
return nil, fmt.Errorf("expected a KeyRenameOutput as command result")
}