From afba7a57cdd4fe7c1b0741dbf8f8c78b14a68089 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Thu, 4 Sep 2025 13:04:09 -0700 Subject: [PATCH] fix: do not print usage on runtime error (#1315) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description --- > Should include a concise description of the changes (bug or feature), it's > impact, along with a summary of the solution ## PR Checklist --- > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes # --- cmd/root.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index 50135f4d23..9a7bfff6e1 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -219,6 +219,9 @@ func NewCommand(opts ...Option) *Command { o(cmd) } + // Do not print Usage on runtime error + cmd.SilenceUsage = true + // Set server version cmd.cfg.Version = versionString