mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 01:22:42 +01:00
fix password variable shadowing (#5405)
This commit is contained in:
parent
5e022a98e6
commit
ce9a5173fe
1 changed files with 2 additions and 1 deletions
|
@ -301,7 +301,8 @@ func runCreateUser(c *cli.Context) error {
|
||||||
if c.IsSet("password") {
|
if c.IsSet("password") {
|
||||||
password = c.String("password")
|
password = c.String("password")
|
||||||
} else if c.IsSet("random-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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue