diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-08-11 06:42:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 22:42:48 +0000 |
commit | f42cd4561b6ef622b029deedecb2f3e29828a7cb (patch) | |
tree | 9de386cb0995e0a0aa4259b0270bed987de54d7a | |
parent | bfef7d47359117a38cc68d558a16259f0668675c (diff) | |
download | gitea-f42cd4561b6ef622b029deedecb2f3e29828a7cb.tar.gz gitea-f42cd4561b6ef622b029deedecb2f3e29828a7cb.zip |
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
-rw-r--r-- | cmd/admin.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index 745427ca24..a4f48b0513 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -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{ |