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 {
{
say "\n" . get_text('install_admin_setup') . "\n";
}
while (!$email) {
if (not $email) {
print get_text('install_admin_get_email') . ' ';
$email = <STDIN>;
chomp $email;
eval { Bugzilla::User->check_email($email); };
if ($@) {
say $@;
undef $email;
}
chomp $email if defined $email;
}
Bugzilla::User->check_email($email);
# Make sure the email address is used as login when required.
if (Bugzilla->params->{'use_email_as_login'}) {
$login = $email;
}
while (!$login) {
if (not $login) {
print get_text('install_admin_get_login') . ' ';
$login = <STDIN>;
chomp $login;
eval { Bugzilla::User->check_login_name($login); };
if ($@) {
say $@;
undef $login;
}
chomp $login if defined $login;
}
Bugzilla::User->check_login_name($login);
while (!defined $full_name) {
if (not defined $full_name) {
print get_text('install_admin_get_name') . ' ';
$full_name = <STDIN>;
chomp($full_name);
chomp $full_name if defined $full_name;
}
if (!$password) {
if (not $password) {
$password = _prompt_for_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