]> git.giacomolli.uk - onechat/blobdiff - terminal.go
Complete context on forwarded local errors
[onechat] / terminal.go
index db259fb15c75c3d4ea2221a35812111f3ba5f3aa..340a8aa1e54118ecff9a06feffd3a93acc905119 100644 (file)
@@ -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