diff options
author | Sandro Santilli <strk@kbt.io> | 2017-01-05 09:31:07 +0100 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-02-12 09:53:46 +0100 |
commit | 9b4f6c1c32c416e1cca0e29991c4f2481f26939d (patch) | |
tree | 77b6a8687fff2f595d3bb0fbad3a9b7f366a1a04 /cmd | |
parent | 076f940f1ff7cc075240d30179a92bdf52c006e4 (diff) | |
download | gitea-9b4f6c1c32c416e1cca0e29991c4f2481f26939d.tar.gz gitea-9b4f6c1c32c416e1cca0e29991c4f2481f26939d.zip |
Handle SetModel error, fixes one errcheck report (#257)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/admin.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index 440a172a82..f4782195e4 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -74,7 +74,9 @@ func runCreateUser(c *cli.Context) error { setting.NewContext() models.LoadConfigs() - models.SetEngine() + if err := models.SetEngine(); err != nil { + return fmt.Errorf("models.SetEngine: %v", err) + } if err := models.CreateUser(&models.User{ Name: c.String("name"), |