Unverified Commit d4add99a authored by Whyrusleeping's avatar Whyrusleeping Committed by GitHub

Merge pull request #4437 from ipfs/fix/add-abort-panic

Fix/add abort panic
parents a81025f8 a3a31793
......@@ -364,9 +364,12 @@ func callCommand(ctx context.Context, req cmds.Request, root *cmds.Command, cmd
}
go func() {
err = cmds.Copy(re, res)
err := cmds.Copy(re, res)
if err != nil {
re.SetError(err, cmdkit.ErrNormal|cmdkit.ErrFatal)
err = re.Emit(cmdkit.Error{err.Error(), cmdkit.ErrNormal | cmdkit.ErrFatal})
if err != nil {
log.Error(err)
}
}
}()
} else {
......
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