FIX: RANDOM_PASSWORD not working rake admin:create

We regressed behavior of this env var which enable admin account
creation with a random password
This commit is contained in:
Sam Saffron 2020-03-15 17:24:11 +11:00
parent d27ece9ded
commit a14313e9d0
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5
1 changed files with 2 additions and 1 deletions

View File

@ -65,9 +65,10 @@ task "admin:create" => :environment do
else
password = ask("Password: ") { |q| q.echo = false }
password_confirmation = ask("Repeat password: ") { |q| q.echo = false }
passwords_match = password == password_confirmation
end
passwords_match = password == password_confirmation
say("Passwords don't match, try again...") unless passwords_match
end while !passwords_match
admin.password = password