Do not remove git work directory in debug mode
This commit is contained in:
parent
06228c58f3
commit
b0b39726b8
@ -84,7 +84,9 @@ func processConfiguredRepositoryAction(h *common.RequestHandler, action *common.
|
||||
prjgit := config.GitProjectName
|
||||
git, err := common.CreateGitHandler(GitAuthor, GitEmail, AppName)
|
||||
common.PanicOnError(err)
|
||||
// defer git.Close()
|
||||
if !debugMode {
|
||||
defer git.Close()
|
||||
}
|
||||
|
||||
prjGitRepo, err := gitea.CreateRepositoryIfNotExist(git, *action.Organization, prjgit)
|
||||
if err != nil {
|
||||
@ -145,7 +147,9 @@ func processConfiguredPushAction(h *common.RequestHandler, action *common.PushWe
|
||||
prjgit := config.GitProjectName
|
||||
git, err := common.CreateGitHandler(GitAuthor, GitEmail, AppName)
|
||||
common.PanicOnError(err)
|
||||
if !debugMode {
|
||||
defer git.Close()
|
||||
}
|
||||
|
||||
prjGitRepo, err := gitea.CreateRepositoryIfNotExist(git, *action.Repository.Owner, prjgit)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user