Skip to content

Commit ce9a517

Browse files
adelowolafriks
authored andcommitted
fix password variable shadowing (#5405)
1 parent 5e022a9 commit ce9a517

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/admin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ func runCreateUser(c *cli.Context) error {
301301
if c.IsSet("password") {
302302
password = c.String("password")
303303
} else if c.IsSet("random-password") {
304-
password, err := generate.GetRandomString(c.Int("random-password-length"))
304+
var err error
305+
password, err = generate.GetRandomString(c.Int("random-password-length"))
305306
if err != nil {
306307
return err
307308
}

0 commit comments

Comments
 (0)