Commit b7ce80c0 authored by Xiaoyi Wang's avatar Xiaoyi Wang

Fix key rename command output error

License: MIT
Signed-off-by: default avatarXiaoyi Wang <wangxiaoyi@hyperchain.cn>
parent 8b383da2
......@@ -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")
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment