0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-12 04:51:38 +01:00

fix password variable shadowing (#5405)

This commit is contained in:
Lanre Adelowo 2018-11-26 16:00:38 +01:00 committed by Lauris BH
parent 5e022a98e6
commit ce9a5173fe

View file

@ -301,7 +301,8 @@ func runCreateUser(c *cli.Context) error {
if c.IsSet("password") {
password = c.String("password")
} else if c.IsSet("random-password") {
password, err := generate.GetRandomString(c.Int("random-password-length"))
var err error
password, err = generate.GetRandomString(c.Int("random-password-length"))
if err != nil {
return err
}