Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorSecondThundeR <awayfromgalaxy@gmail.com>2021-04-05 23:13:27 +0300
committerDylan Taylor <dylan@dylanmtaylor.com>2021-04-08 09:20:39 -0400
commit23fc3ab2f2d11d49e1eab3b36d3c2758d682e5cd (patch)
treec92da499328b2f8c4b379ff0bf3c33fb15e270a6 /archinstall/lib
parentb6e9f11669cb8264767230823ad15361c65ab56d (diff)
Fix incorrect behavior for empty sudo username
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/user_interaction.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index a58abcff..3830962c 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -61,8 +61,6 @@ def ask_for_superuser_account(prompt='Create a required super-user with sudo pri
while 1:
new_user = input(prompt).strip(' ')
- if not check_for_correct_username(new_user):
- continue
if not new_user and forced:
# TODO: make this text more generic?
# It's only used to create the first sudo user when root is disabled in guided.py
@@ -70,6 +68,8 @@ def ask_for_superuser_account(prompt='Create a required super-user with sudo pri
continue
elif not new_user and not forced:
raise UserError("No superuser was created.")
+ elif not check_for_correct_username(new_user):
+ continue
password = get_password(prompt=f'Password for user {new_user}: ')
return {new_user: {"!password" : password}}