We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8503456 commit 9bccfe9Copy full SHA for 9bccfe9
modules/doctor/doctor.go
@@ -11,6 +11,7 @@ import (
11
"strings"
12
13
"code.gitea.io/gitea/models/db"
14
+ "code.gitea.io/gitea/modules/git"
15
"code.gitea.io/gitea/modules/log"
16
"code.gitea.io/gitea/modules/setting"
17
)
@@ -49,7 +50,11 @@ func initDBDisableConsole(ctx context.Context, disableConsole bool) error {
49
50
51
setting.NewXORMLogService(disableConsole)
52
if err := db.InitEngine(ctx); err != nil {
- return fmt.Errorf("models.SetEngine: %v", err)
53
+ return fmt.Errorf("db.InitEngine: %w", err)
54
+ }
55
+ // some doctor sub-commands need to use git command
56
+ if err := git.InitOnceWithSync(ctx); err != nil {
57
+ return fmt.Errorf("git.InitOnceWithSync: %w", err)
58
}
59
return nil
60
0 commit comments