Fix dump-repo git init, fix wrong error type for NullDownloader (#20182)

* Fix `dump-repo` git init

* fix wrong error type for NullDownloader
This commit is contained in:
wxiaoguang 2022-07-01 07:48:25 +08:00 committed by GitHub
parent 184a7d4195
commit d6c0aa7f1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 11 deletions

View file

@ -10,6 +10,7 @@ import (
"strings"
"code.gitea.io/gitea/modules/convert"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
base "code.gitea.io/gitea/modules/migration"
"code.gitea.io/gitea/modules/setting"
@ -83,6 +84,11 @@ func runDumpRepository(ctx *cli.Context) error {
return err
}
// migrations.GiteaLocalUploader depends on git module
if err := git.InitSimple(context.Background()); err != nil {
return err
}
log.Info("AppPath: %s", setting.AppPath)
log.Info("AppWorkPath: %s", setting.AppWorkPath)
log.Info("Custom path: %s", setting.CustomPath)