File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,8 +268,12 @@ def validator(s: str | None) -> str | None:
268268 return downloads
269269
270270
271- def ask_post_installation () -> PostInstallationAction :
272- header = tr ('Installation completed' ) + '\n \n '
271+ def ask_post_installation (elapsed_time : float | None = None ) -> PostInstallationAction :
272+ header = 'Installation completed'
273+ if elapsed_time is not None :
274+ minutes = int (elapsed_time // 60 )
275+ seconds = int (elapsed_time % 60 )
276+ header += f' in { minutes } m { seconds } s' + '\n '
273277 header += tr ('What would you like to do next?' ) + '\n '
274278
275279 items = [MenuItem (action .value , value = action ) for action in PostInstallationAction ]
Original file line number Diff line number Diff line change 11import os
2+ import time
23from pathlib import Path
34
45from archinstall import SysInfo
@@ -53,6 +54,7 @@ def perform_installation(mountpoint: Path) -> None:
5354 Only requirement is that the block devices are
5455 formatted and setup prior to entering this function.
5556 """
57+ start_time = time .time ()
5658 info ('Starting installation...' )
5759
5860 config = arch_config_handler .config
@@ -168,7 +170,8 @@ def perform_installation(mountpoint: Path) -> None:
168170
169171 if not arch_config_handler .args .silent :
170172 with Tui ():
171- action = ask_post_installation ()
173+ elapsed_time = time .time () - start_time
174+ action = ask_post_installation (elapsed_time )
172175
173176 match action :
174177 case PostInstallationAction .EXIT :
You can’t perform that action at this time.
0 commit comments