提交 5c7926ca 作者: Jeromy Johnson

Merge pull request #797 from jbenet/fix/add-noinit

return early from add PostRun if error is set
...@@ -112,6 +112,9 @@ remains to be implemented. ...@@ -112,6 +112,9 @@ remains to be implemented.
}() }()
}, },
PostRun: func(req cmds.Request, res cmds.Response) { PostRun: func(req cmds.Request, res cmds.Response) {
if res.Error() != nil {
return
}
outChan, ok := res.Output().(<-chan interface{}) outChan, ok := res.Output().(<-chan interface{})
if !ok { if !ok {
res.SetError(u.ErrCast(), cmds.ErrNormal) res.SetError(u.ErrCast(), cmds.ErrNormal)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论