Call git.InitSimple for runRepoSyncReleases (#26396)

Fix #26394

Otherwise, the git module is not initialized and it doesn't respect the
"timeout" config in app.ini
This commit is contained in:
wxiaoguang 2023-08-11 06:42:48 +08:00 committed by GitHub
parent bfef7d4735
commit f42cd4561b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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{