Skip to content

Commit

Permalink
fix: Check for error on commit execution
Browse files Browse the repository at this point in the history
  • Loading branch information
HRemonen committed Aug 4, 2024
1 parent 5f302b2 commit 375f607
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/commit/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ func CreateGitCommit(commit Commit, stagedFiles []string) error {
commitGitCmd.Stdout = os.Stdout
commitGitCmd.Stderr = os.Stderr

commitGitCmd.Run()
if err := commitGitCmd.Run(); err != nil {
return err
}

updateIndexCmd := exec.Command("git", "update-index", "-g")
updateIndexCmd.Stdout = os.Stdout
Expand Down

0 comments on commit 375f607

Please sign in to comment.