From 392f7feb5496ced4a9e08a8eb9e2a4d6a6edec17 Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Sat, 27 May 2023 14:45:27 +0200 Subject: [PATCH] fix(route-check): don't show cli usage on template errors --- cmd/routes_check.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/routes_check.go b/cmd/routes_check.go index 996a002..6102e22 100644 --- a/cmd/routes_check.go +++ b/cmd/routes_check.go @@ -134,7 +134,8 @@ Examples: if err != nil { slog.Error("handler returned an error.", "err", err) - // Return errors immediately + // Return errors immediately (but don't trigger the command's help text) + cmd.SilenceUsage = true return err }