We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ea5e43 commit 2f3b9c4Copy full SHA for 2f3b9c4
cmd/hook.go
@@ -34,18 +34,18 @@ func createHooks(confPath string, isReplace bool) error {
34
}
35
36
func writeHooks(hookDir, confPath string, isReplace bool) error {
37
- err := os.MkdirAll(hookDir, os.ModePerm)
38
- if err != nil {
39
- return err
40
- }
41
-
42
// if commit-msg already exists skip creating or overwriting it
43
if _, err := os.Stat(hookDir); !os.IsNotExist(err) {
44
if !isReplace {
45
return errHooksExist
46
47
48
+ err := os.MkdirAll(hookDir, os.ModePerm)
+ if err != nil {
+ return err
+ }
+
49
// create hook file
50
return hook.WriteHooks(hookDir, confPath)
51
0 commit comments