diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2018-11-26 16:00:38 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-11-26 17:00:38 +0200 |
commit | ce9a5173feafd0903257229f8e2ffcc01b9ebcd2 (patch) | |
tree | de9bedf25301cebb2de2fff070eeadfaa32c313f /cmd | |
parent | 5e022a98e6429d08e3a32e10fa7ba98566ab71a1 (diff) | |
download | gitea-ce9a5173feafd0903257229f8e2ffcc01b9ebcd2.tar.gz gitea-ce9a5173feafd0903257229f8e2ffcc01b9ebcd2.zip |
fix password variable shadowing (#5405)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/admin.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index 9422e50709..ac911f184b 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -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 } |