1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix git.Init for doctor sub-command (#20782)

This commit is contained in:
wxiaoguang
2022-08-14 00:33:18 +08:00
committed by GitHub
parent 3d7058adbe
commit 11dc6df5be
2 changed files with 6 additions and 7 deletions

View File

@@ -14,7 +14,6 @@ import (
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/migrations"
"code.gitea.io/gitea/modules/doctor"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
@@ -128,11 +127,6 @@ func runDoctor(ctx *cli.Context) error {
stdCtx, cancel := installSignals()
defer cancel()
// some doctor sub-commands need to use git command
if err := git.InitFull(stdCtx); err != nil {
return err
}
// Silence the default loggers
log.DelNamedLogger("console")
log.DelNamedLogger(log.DEFAULT)