From bdba89452db9843dcc7835633ef83c80b7ada54a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 23 Apr 2021 20:56:21 +0800 Subject: [PATCH] Fix missing storage init (#15589) (#15598) --- cmd/admin.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/admin.go b/cmd/admin.go index 3ddf8eddf..988a8d503 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -21,6 +21,7 @@ import ( pwd "code.gitea.io/gitea/modules/password" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" "github.com/urfave/cli" ) @@ -489,6 +490,10 @@ func runDeleteUser(c *cli.Context) error { return err } + if err := storage.Init(); err != nil { + return err + } + var err error var user *models.User if c.IsSet("email") {