Skip to content

Commit b2112a5

Browse files
Added Error Handling to the GetBool func (coderabbit suggestion
1 parent eafbec6 commit b2112a5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cmd/cli/root.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ var creatCommitMsg = &cobra.Command{
5353
Use: ".",
5454
Short: "Create Commit Message",
5555
RunE: func(cmd *cobra.Command, args []string) error {
56-
dryRun, _ := cmd.Flags().GetBool("dry-run")
56+
dryRun, err := cmd.Flags().GetBool("dry-run")
57+
if err != nil {
58+
return err
59+
}
5760
CreateCommitMsg(dryRun)
5861
return nil
5962
},

0 commit comments

Comments
 (0)