diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-07 11:11:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-07 11:11:27 +0800 |
commit | 69b61d437357235700306f28d22d21acc39bb2b5 (patch) | |
tree | 33af1d4d797b428556a323837fcc3eda38a54479 /cmd/convert.go | |
parent | c9110eb5e4657e018695f084f37e1b423939e9e0 (diff) | |
download | gitea-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/convert.go')
-rw-r--r-- | cmd/convert.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/convert.go b/cmd/convert.go index 20e4045c34..0b2e240b32 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -23,7 +23,10 @@ var CmdConvert = cli.Command{ } func runConvert(ctx *cli.Context) error { - if err := initDB(); err != nil { + stdCtx, cancel := installSignals() + defer cancel() + + if err := initDB(stdCtx); err != nil { return err } |