]> git.giacomolli.uk - onechat/blobdiff - main.go
Give the rebuild its own call limit
[onechat] / main.go
diff --git a/main.go b/main.go
index ac4afe48d19185265c0053741acb4442a2734aa6..9c1c8b92f7abf6c301ad4a64c849b623838a13e7 100644 (file)
--- a/main.go
+++ b/main.go
@@ -42,13 +42,14 @@ func run() error {
        case len(args) == 1 && (args[0] == "help" || args[0] == "--help" || args[0] == "-h"):
                _, err := fmt.Print(usage)
                if err != nil {
        case len(args) == 1 && (args[0] == "help" || args[0] == "--help" || args[0] == "-h"):
                _, err := fmt.Print(usage)
                if err != nil {
-                       return err
+                       return fmt.Errorf("write command help: %w", err)
                }
        case len(args) == 1 && args[0] == "login":
                err := chatgptLogin(ctx, os.Stdout)
                if err != nil {
                        return err
                }
                }
        case len(args) == 1 && args[0] == "login":
                err := chatgptLogin(ctx, os.Stdout)
                if err != nil {
                        return err
                }
+
        // A signal is the normal stop of the daemon and the client, so their
        // result does not include ctx.Err().
        case len(args) == 1 && args[0] == "daemon":
        // A signal is the normal stop of the daemon and the client, so their
        // result does not include ctx.Err().
        case len(args) == 1 && args[0] == "daemon":