X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/bd7da3557dc7a17020931f5a49ed5007fa81a645..fc0503be49438775c5d08499046852df59bd7377:/terminal.go diff --git a/terminal.go b/terminal.go index db259fb..340a8aa 100644 --- a/terminal.go +++ b/terminal.go @@ -46,7 +46,12 @@ func terminal(ctx context.Context, in io.Reader, out io.Writer) error { return fmt.Errorf(`connect to the daemon (start it with "onechat daemon"): %w`, err) } - return terminalSession(ctx, conn, in, out) + err = terminalSession(ctx, conn, in, out) + if err != nil { + return fmt.Errorf("run terminal session: %w", err) + } + + return nil } // terminalSession runs the client on conn until the input ends, the daemon