Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorSecondThundeR <awayfromgalaxy@gmail.com>2021-04-05 23:13:27 +0300
committerSecondThundeR <awayfromgalaxy@gmail.com>2021-04-05 23:13:27 +0300
commit924b369233e28c11c8bfec423fa25dc9d84e61de (patch)
tree5a9553b20ba1e760576b23199ac3c5b8f6c4b010 /archinstall
parented2187ee709e40e9da50cec9f0eaf45e77d6a8e9 (diff)
Fix incorrect behavior for empty sudo username
Diffstat (limited to 'archinstall')
-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 a337066e..44c0cb13 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}}