mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-09-12 09:51:19 +02:00
Handle SetModel error, fixes one errcheck report (#257)
This commit is contained in:
parent
076f940f1f
commit
9b4f6c1c32
|
@ -74,7 +74,9 @@ func runCreateUser(c *cli.Context) error {
|
||||||
|
|
||||||
setting.NewContext()
|
setting.NewContext()
|
||||||
models.LoadConfigs()
|
models.LoadConfigs()
|
||||||
models.SetEngine()
|
if err := models.SetEngine(); err != nil {
|
||||||
|
return fmt.Errorf("models.SetEngine: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
if err := models.CreateUser(&models.User{
|
if err := models.CreateUser(&models.User{
|
||||||
Name: c.String("name"),
|
Name: c.String("name"),
|
||||||
|
|
Loading…
Reference in a new issue