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