diff --git a/main.go b/main.go index 91384b0..caaf38c 100644 --- a/main.go +++ b/main.go @@ -53,7 +53,9 @@ func main() { cmd.Flags().StringVar(&args.OutputMode, "output-mode", "single", "Output mode to generate a single file or one file per group ('group' or 'single')") cmd.Flags().IntVar(&args.MaxDepth, "max-depth", 10, "Maximum recursion level for type discovery") - cmd.Execute() + if err := cmd.Execute(); err != nil { + os.Exit(1) + } } func doRun(_ *cobra.Command, _ []string) error {