Browse Source

fix password variable shadowing (#5405)

tags/v1.21.12.1
Lanre Adelowo Lauris BH 7 years ago
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