Skip to content

Commit

Permalink
cmd/bootc-image-builder/main: Introduce error handling
Browse files Browse the repository at this point in the history
Error handling on argument parsing. Remark from golangci-lint.
  • Loading branch information
schuellerf committed Jan 7, 2025
1 parent 0e75c2c commit 8cbd0d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bib/cmd/bootc-image-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,10 @@ func buildCobraCmdline() (*cobra.Command, error) {
Use: "version",
Short: "Show the version and quit",
SilenceUsage: true,
Run: func(cmd *cobra.Command, args []string) {
RunE: func(cmd *cobra.Command, args []string) error {
root := cmd.Root()
root.SetArgs([]string{"--version"})
root.Execute()
return root.Execute()
},
}

Expand Down

0 comments on commit 8cbd0d0

Please sign in to comment.