Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ We collect anonymous usage data to help improve cagent. To disable:
}
return nil
}
if rootCmd.RunE != nil {
originalRunE := rootCmd.RunE
rootCmd.RunE = func(cmd *cobra.Command, args []string) error {
if err := originalRunE(cmd, args); err != nil {
return processErr(cmd.Context(), err, stderr, rootCmd)
}
return nil
}
}
return rootCmd
}, metadata.Metadata{
SchemaVersion: "0.1.0",
Expand Down