From b7ce80c0f587b637bfb721f8b45db4515680dd88 Mon Sep 17 00:00:00 2001 From: Xiaoyi Wang Date: Sun, 22 Apr 2018 11:45:37 +0800 Subject: [PATCH] Fix key rename command output error License: MIT Signed-off-by: Xiaoyi Wang --- core/commands/keystore.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/commands/keystore.go b/core/commands/keystore.go index 815b45d20..e6a98c45a 100644 --- a/core/commands/keystore.go +++ b/core/commands/keystore.go @@ -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") }