@cryptotaxi247 / kubo / commits / 15b181ffe

return early from add PostRun if error is set

Jeromy committed Feb 19, 2015 at 13:52 UTC 15b181ffe24b896f9b01f66fe431143843e06718
1 file changed +3
core/commands/add.go
+3
@@ -112,6 +112,9 @@ remains to be implemented.
112 }()
113 },
114 PostRun: func(req cmds.Request, res cmds.Response) {
115 + if res.Error() != nil {
116 + return
117 + }
118 outChan, ok := res.Output().(<-chan interface{})
119 if !ok {
120 res.SetError(u.ErrCast(), cmds.ErrNormal)