mirror of
https://github.com/ipfs/kubo.git
synced 2025-10-14 10:15:48 +08:00
fix: use EmitOnce where only single response is to be sent
Part of #4818 License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
@ -71,7 +71,7 @@ func CommandsCmd(root *cmds.Command) *cmds.Command {
|
||||
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) {
|
||||
rootCmd := cmd2outputCmd("ipfs", root)
|
||||
rootCmd.showOpts, _ = req.Options[flagsOptionName].(bool)
|
||||
err := res.Emit(&rootCmd)
|
||||
err := cmds.EmitOnce(res, &rootCmd)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user