X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/448c931a776c3e3f65ca2eab11da0c062d597818..bd7da3557dc7a17020931f5a49ed5007fa81a645:/command.go?ds=inline diff --git a/command.go b/command.go index a49f1d9..02901e2 100644 --- a/command.go +++ b/command.go @@ -48,7 +48,7 @@ func parseCommand(ctx context.Context, args []string) error { case len(args) == 1 && args[0] == "login": err := chatgptLogin(ctx, os.Stdout) if err != nil { - return err + return fmt.Errorf("log in: %w", err) } // A signal is the normal stop of the daemon and the client, so their @@ -66,7 +66,7 @@ func parseCommand(ctx context.Context, args []string) error { case len(args) > 0 && args[0] == "probe": err := probe(ctx, args[1:], os.Stdout) if err != nil { - return err + return fmt.Errorf("run probe: %w", err) } default: return fmt.Errorf("unknown command %q\n\n%s", strings.Join(args, " "), strings.TrimSuffix(usage, "\n"))