aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git_hooks_deploy.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/git_hooks_deploy.go b/git_hooks_deploy.go
index 86df6e3..5952c83 100644
--- a/git_hooks_deploy.go
+++ b/git_hooks_deploy.go
@@ -4,6 +4,7 @@
package main
import (
+ "errors"
"io"
"io/fs"
"os"
@@ -48,7 +49,10 @@ func deployHooks() (err error) {
"pre-receive",
} {
if err = os.Symlink(filepath.Join(config.Hooks.Execs, "hookc"), filepath.Join(config.Hooks.Execs, hookName)); err != nil {
- return err
+ if !errors.Is(err, fs.ErrExist) {
+ return err
+ }
+ // TODO: Maybe check if it points to the right place?
}
}