summaryrefslogtreecommitdiffstats
path: root/cmd/admin.go
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2017-01-05 09:31:07 +0100
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-02-12 09:53:46 +0100
commit9b4f6c1c32c416e1cca0e29991c4f2481f26939d (patch)
tree77b6a8687fff2f595d3bb0fbad3a9b7f366a1a04 /cmd/admin.go
parent076f940f1ff7cc075240d30179a92bdf52c006e4 (diff)
downloadgitea-9b4f6c1c32c416e1cca0e29991c4f2481f26939d.tar.gz
gitea-9b4f6c1c32c416e1cca0e29991c4f2481f26939d.zip
Handle SetModel error, fixes one errcheck report (#257)
Diffstat (limited to 'cmd/admin.go')
-rw-r--r--cmd/admin.go4
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"),