Skip to content

Commit

Permalink
Force delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Piszmog authored Jul 11, 2022
1 parent 16d442b commit 9ae46ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func Pull(path string) error {

// DeleteBranch deletes the given branch in the given repository.
func DeleteBranch(path string, branch string) error {
if err := exec.Command("git", "-C", path, "branch", "-d", branch).Run(); err != nil {
if err := exec.Command("git", "-C", path, "branch", "-D", branch).Run(); err != nil {
if exitError, ok := err.(*exec.ExitError); ok {
return fmt.Errorf("failed to delete branch %s: %s", branch, exitError.Error())
}
Expand Down

0 comments on commit 9ae46ff

Please sign in to comment.