Skip to content
Open
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
34 changes: 18 additions & 16 deletions archinstall/lib/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,26 @@ def preview(item: MenuItem) -> str | None:

debug(f'Saving configuration files to {dest_path.absolute()}')

header = tr('Do you want to encrypt the user_credentials.json file?')
enc_password: str | None = None

enc_result = await Confirmation(
header=header,
allow_skip=False,
preset=False,
).show()
if save_option in ('user_creds', 'all'):
header = tr('Do you want to encrypt the user_credentials.json file?')

enc_password: str | None = None
if enc_result.type_ == ResultType.Selection:
if enc_result.get_value():
password = await get_password(
header=tr('Credentials file encryption password'),
allow_skip=True,
)

if password:
enc_password = password.plaintext
enc_result = await Confirmation(
header=header,
allow_skip=False,
preset=False,
).show()

if enc_result.type_ == ResultType.Selection:
if enc_result.get_value():
password = await get_password(
header=tr('Credentials file encryption password'),
allow_skip=True,
)

if password:
enc_password = password.plaintext

match save_option:
case 'user_config':
Expand Down