diff --git a/cmd/catalog-diff/main.go b/cmd/catalog-diff/main.go index ddcf9f9..c689a8a 100644 --- a/cmd/catalog-diff/main.go +++ b/cmd/catalog-diff/main.go @@ -123,7 +123,10 @@ func main() { root.AddCommand(configCmd()) if err := root.Execute(); err != nil { - fmt.Fprintln(os.Stderr, "error:", err) + // errSilent only carries an exit code; the diff is already printed. + if !errors.Is(err, errSilent) { + fmt.Fprintln(os.Stderr, "error:", err) + } var ee *exitError if errors.As(err, &ee) { os.Exit(ee.code)