|
@@ -75,7 +75,7 @@ func generateAndMigrateGitHooks(x *xorm.Engine) (err error) {
|
|
|
|
|
|
|
|
|
|
|
|
- if hookName != "update" && com.IsFile(oldHookPath) && !com.IsExist(newHookPath) {
|
|
|
+ if hookName != "update" && com.IsFile(oldHookPath) && !com.IsExist(customHookDir) {
|
|
|
os.MkdirAll(customHookDir, os.ModePerm)
|
|
|
if err = os.Rename(oldHookPath, newHookPath); err != nil {
|
|
|
return fmt.Errorf("move hook file to custom directory '%s' -> '%s': %v", oldHookPath, newHookPath, err)
|