Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion archinstall/lib/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def _process_creds_data(self, creds_data: str) -> dict[str, Any] | None:
decryption_pwd = get_password(
header=prompt,
allow_skip=False,
skip_confirmation=True,
no_confirmation=True,
)

if not decryption_pwd:
Expand Down
11 changes: 7 additions & 4 deletions archinstall/lib/menu/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_password(
header: str | None = None,
allow_skip: bool = False,
preset: str | None = None,
skip_confirmation: bool = False,
no_confirmation: bool = False,
) -> Password | None:
while True:
result = Input(
Expand All @@ -35,7 +35,7 @@ def get_password(
password = Password(plaintext=result.get_value())
break

if skip_confirmation:
if no_confirmation:
return password

confirmation_header = f'{tr("Password")}: {password.hidden()}\n\n'
Expand All @@ -46,13 +46,16 @@ def _validate(value: str) -> str | None:
return tr('The password did not match, please try again')
return None

_ = Input(
result = Input(
header=confirmation_header,
allow_skip=False,
allow_skip=allow_skip,
password=True,
validator_callback=_validate,
).show()

if result.type_ == ResultType.Skip:
return None

return password


Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/user/user_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def handle_action(self, action: str, entry: User | None, data: list[User]) -> li
elif action == self._actions[1] and entry: # change password
header = f'{tr("User")}: {entry.username}\n'
header += tr('Enter new password')
new_password = get_password(header=header)
new_password = get_password(header=header, allow_skip=True)

if new_password:
user = next(filter(lambda x: x == entry, data))
Expand Down