mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-23 01:58:03 +08:00
Remove hardcoded paths to fix randomly failing tests (#3347)
* Remove hardcoded paths to fix randomly failing tests * Use correct function for merge path
This commit is contained in:

committed by
Kim "BKC" Carlbäcker

parent
d8dff304c0
commit
be1330ec89
@ -299,7 +299,7 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository, mergeStyle
|
||||
}
|
||||
|
||||
// Clone base repo.
|
||||
tmpBasePath := path.Join(setting.AppDataPath, "tmp/repos", com.ToStr(time.Now().Nanosecond())+".git")
|
||||
tmpBasePath := path.Join(LocalCopyPath(), "merge-"+com.ToStr(time.Now().Nanosecond())+".git")
|
||||
|
||||
if err := os.MkdirAll(path.Dir(tmpBasePath), os.ModePerm); err != nil {
|
||||
return fmt.Errorf("Failed to create dir %s: %v", tmpBasePath, err)
|
||||
|
Reference in New Issue
Block a user