Browse Source

fix password variable shadowing (#5405)

for-closed-social
Lanre Adelowo 5 years ago
committed by Lauris BH
parent
commit
ce9a5173fe
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      cmd/admin.go

+ 2
- 1
cmd/admin.go 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
}

Loading…
Cancel
Save