Skip to content
Merged
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
8 changes: 6 additions & 2 deletions archinstall/lib/interactions/general_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,12 @@ def validator(s: str | None) -> str | None:
return downloads


def ask_post_installation() -> PostInstallationAction:
header = tr('Installation completed') + '\n\n'
def ask_post_installation(elapsed_time: float | None = None) -> PostInstallationAction:
header = 'Installation completed'
if elapsed_time is not None:
minutes = int(elapsed_time // 60)
seconds = int(elapsed_time % 60)
header += f' in {minutes}m {seconds}s' + '\n'
header += tr('What would you like to do next?') + '\n'

items = [MenuItem(action.value, value=action) for action in PostInstallationAction]
Expand Down
5 changes: 4 additions & 1 deletion archinstall/scripts/guided.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import time
from pathlib import Path

from archinstall import SysInfo
Expand Down Expand Up @@ -53,6 +54,7 @@ def perform_installation(mountpoint: Path) -> None:
Only requirement is that the block devices are
formatted and setup prior to entering this function.
"""
start_time = time.time()
info('Starting installation...')

config = arch_config_handler.config
Expand Down Expand Up @@ -168,7 +170,8 @@ def perform_installation(mountpoint: Path) -> None:

if not arch_config_handler.args.silent:
with Tui():
action = ask_post_installation()
elapsed_time = time.time() - start_time
action = ask_post_installation(elapsed_time)

match action:
case PostInstallationAction.EXIT:
Expand Down