Commit 8afe38b1 authored by Tina Hardison's avatar Tina Hardison Committed by Dylan Hardison

Bug 1284021 - checksetup.pl spins in an infinite loop when denied terminal input…

Bug 1284021 - checksetup.pl spins in an infinite loop when denied terminal input and no admin login is provided r=dkl
parent 5880669d
...@@ -330,41 +330,31 @@ sub create_admin { ...@@ -330,41 +330,31 @@ sub create_admin {
{ {
say "\n" . get_text('install_admin_setup') . "\n"; say "\n" . get_text('install_admin_setup') . "\n";
} }
if (not $email) {
while (!$email) {
print get_text('install_admin_get_email') . ' '; print get_text('install_admin_get_email') . ' ';
$email = <STDIN>; $email = <STDIN>;
chomp $email; chomp $email if defined $email;
eval { Bugzilla::User->check_email($email); };
if ($@) {
say $@;
undef $email;
}
} }
Bugzilla::User->check_email($email);
# Make sure the email address is used as login when required. # Make sure the email address is used as login when required.
if (Bugzilla->params->{'use_email_as_login'}) { if (Bugzilla->params->{'use_email_as_login'}) {
$login = $email; $login = $email;
} }
while (!$login) { if (not $login) {
print get_text('install_admin_get_login') . ' '; print get_text('install_admin_get_login') . ' ';
$login = <STDIN>; $login = <STDIN>;
chomp $login; chomp $login if defined $login;
eval { Bugzilla::User->check_login_name($login); };
if ($@) {
say $@;
undef $login;
}
} }
Bugzilla::User->check_login_name($login);
while (!defined $full_name) { if (not defined $full_name) {
print get_text('install_admin_get_name') . ' '; print get_text('install_admin_get_name') . ' ';
$full_name = <STDIN>; $full_name = <STDIN>;
chomp($full_name); chomp $full_name if defined $full_name;
} }
if (!$password) { if (not $password) {
$password = _prompt_for_password( $password = _prompt_for_password(
get_text('install_admin_get_password')); get_text('install_admin_get_password'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment