Skip to content

Commit 7bb37b3

Browse files
wxiaoguangGiteaBot
authored andcommitted
Call git.InitSimple for runRepoSyncReleases (go-gitea#26396)
Fix go-gitea#26394 Otherwise, the git module is not initialized and it doesn't respect the "timeout" config in app.ini
1 parent 7c555b2 commit 7bb37b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/admin.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ func runRepoSyncReleases(_ *cli.Context) error {
348348
return err
349349
}
350350

351+
if err := git.InitSimple(ctx); err != nil {
352+
return err
353+
}
354+
351355
log.Trace("Synchronizing repository releases (this may take a while)")
352356
for page := 1; ; page++ {
353357
repos, count, err := repo_model.SearchRepositoryByName(ctx, &repo_model.SearchRepoOptions{

0 commit comments

Comments
 (0)