1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-04 17:24:26 +00:00
This commit is contained in:
Unknown 2014-04-26 19:06:59 -06:00
parent 89b68bdd45
commit 1badb2bbcc

View File

@ -403,10 +403,11 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
return err return err
} }
rp := strings.NewReplacer("\\", "/", " ", "\\ ")
// hook/post-update // hook/post-update
if err := createHookUpdate(filepath.Join(repoPath, "hooks", "update"), if err := createHookUpdate(filepath.Join(repoPath, "hooks", "update"),
fmt.Sprintf("#!/usr/bin/env %s\n%s update $1 $2 $3\n", base.ScriptType, fmt.Sprintf("#!/usr/bin/env %s\n%s update $1 $2 $3\n", base.ScriptType,
strings.Replace(appPath, "\\", "/", -1))); err != nil { rp.Replace(appPath))); err != nil {
return err return err
} }