Skip to content

Commit b567107

Browse files
feat: trim spaces from the uninstall
1 parent 3cc81d0 commit b567107

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/hooks/uninstall.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"os/exec"
77
"path/filepath"
8+
"strings"
89
)
910

1011
// Uninstall removes pre-commit hooks, either locally or globally.
@@ -44,7 +45,7 @@ func uninstallGlobal() error {
4445
return fmt.Errorf("failed to get global hooks path: %v", err)
4546
}
4647

47-
globalHooksPath := filepath.Clean(string(output))
48+
globalHooksPath := filepath.Clean(strings.TrimSpace(string(output)))
4849

4950
// If core.hooksPath is not set, default to ~/.git/hooks
5051
if globalHooksPath == "" {

0 commit comments

Comments
 (0)