mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 01:12:24 +08:00
Merge pull request #797 from jbenet/fix/add-noinit
return early from add PostRun if error is set
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user