File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -18,21 +18,16 @@ const (
1818
1919func TestMain (m * testing.M ) {
2020 originalRepoRootPath := setting .RepoRootPath
21- defer func () {
22- setting .RepoRootPath = originalRepoRootPath
23- }()
24- setting .RepoRootPath , _ = filepath .Abs (testReposDir )
25-
2621 originalHomePath := setting .Git .HomePath
27- defer func () {
28- setting .Git .HomePath = originalHomePath
29- }()
30- setting .Git .HomePath = filepath .Join (setting .RepoRootPath , ".home" )
31-
3222 originalGitPath := setting .Git .Path
3323 defer func () {
24+ setting .RepoRootPath = originalRepoRootPath
25+ setting .Git .HomePath = originalHomePath
3426 setting .Git .Path = originalGitPath
3527 }()
28+
29+ setting .RepoRootPath , _ = filepath .Abs (testReposDir )
30+ setting .Git .HomePath = filepath .Join (setting .RepoRootPath , ".home" )
3631 setting .Git .Path = "git"
3732
3833 if err := git .InitSimple (); err != nil {
You can’t perform that action at this time.
0 commit comments