summaryrefslogtreecommitdiffstats
path: root/cmd/migrate.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-07 11:11:27 +0800
committerGitHub <noreply@github.com>2021-11-07 11:11:27 +0800
commit69b61d437357235700306f28d22d21acc39bb2b5 (patch)
tree33af1d4d797b428556a323837fcc3eda38a54479 /cmd/migrate.go
parentc9110eb5e4657e018695f084f37e1b423939e9e0 (diff)
downloadgitea-69b61d437357235700306f28d22d21acc39bb2b5.tar.gz
gitea-69b61d437357235700306f28d22d21acc39bb2b5.zip
Fix bug on admin subcommand (#17533)
* Fix bug on admin subcommand * Add signals for all initDB Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'cmd/migrate.go')
-rw-r--r--cmd/migrate.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/migrate.go b/cmd/migrate.go
index 7bb87d8400..054772d9ec 100644
--- a/cmd/migrate.go
+++ b/cmd/migrate.go
@@ -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
}