Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-06 07:16:46 +0000
committerGitHub <noreply@github.com>2021-04-06 07:16:46 +0000
commit1a09ad7bff5d799180b926df4a3611c8f7a6ea29 (patch)
tree32c91ee4febc63732341012fef3effc06879d7e8 /archinstall/lib
parent116fdb41c138a9c48efb59333987d8826826cd1d (diff)
parent924b369233e28c11c8bfec423fa25dc9d84e61de (diff)
Merge pull request #188 from SecondThundeR/master
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}}