Skip to content

Commit

Permalink
Call git.InitSimple for runRepoSyncReleases (#26396) (#26450)
Browse files Browse the repository at this point in the history
Backport #26396 by @wxiaoguang

Fix #26394

Otherwise, the git module is not initialized and it doesn't respect the
"timeout" config in app.ini

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
  • Loading branch information
GiteaBot and wxiaoguang committed Aug 10, 2023
1 parent 7c555b2 commit d6cf261
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ func runRepoSyncReleases(_ *cli.Context) error {
return err
}

if err := git.InitSimple(ctx); err != nil {
return err
}

log.Trace("Synchronizing repository releases (this may take a while)")
for page := 1; ; page++ {
repos, count, err := repo_model.SearchRepositoryByName(ctx, &repo_model.SearchRepoOptions{
Expand Down

0 comments on commit d6cf261

Please sign in to comment.