Skip to content

Commit

Permalink
Call git.InitSimple for runRepoSyncReleases (#26396)
Browse files Browse the repository at this point in the history
Fix #26394

Otherwise, the git module is not initialized and it doesn't respect the
"timeout" config in app.ini
  • Loading branch information
wxiaoguang committed Aug 10, 2023
1 parent bfef7d4 commit f42cd45
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 @@ -355,6 +355,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 f42cd45

Please sign in to comment.