1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Fix bug on admin subcommand (#17533)

* Fix bug on admin subcommand

* Add signals for all initDB

Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
Lunny Xiao
2021-11-07 11:11:27 +08:00
committed by GitHub
parent c9110eb5e4
commit 69b61d4373
13 changed files with 120 additions and 79 deletions

View File

@@ -24,7 +24,10 @@ var CmdMigrate = cli.Command{
}
func runMigrate(ctx *cli.Context) error {
if err := initDB(); err != nil {
stdCtx, cancel := installSignals()
defer cancel()
if err := initDB(stdCtx); err != nil {
return err
}