88
99from archinstall .lib .args import arch_config_handler
1010from archinstall .lib .disk .utils import disk_layouts
11+ from archinstall .lib .general import running_from_host
1112from archinstall .lib .network .wifi_handler import wifi_handler
1213from archinstall .lib .networking import ping
13- from archinstall .lib .packages .packages import check_package_upgrade
14- from archinstall .tui .ui .components import tui as ttui
14+ from archinstall .lib .packages .packages import check_version_upgrade
1515
16- from .lib .general import running_from_host
1716from .lib .hardware import SysInfo
1817from .lib .output import FormattedOutput , debug , error , info , log , warn
1918from .lib .pacman import Pacman
2019from .lib .plugins import load_plugin , plugins
2120from .lib .translationhandler import Language , tr , translation_handler
22- from .tui .curses_menu import Tui
2321
2422
2523# @archinstall.plugin decorator hook to programmatically add
@@ -66,21 +64,6 @@ def _fetch_arch_db() -> None:
6664 sys .exit (1 )
6765
6866
69- def check_version_upgrade () -> str | None :
70- info ('Checking version...' )
71- upgrade = None
72-
73- upgrade = check_package_upgrade ('archinstall' )
74-
75- if upgrade is None :
76- debug ('No archinstall upgrades found' )
77- return None
78-
79- text = tr ('New version available' ) + f': { upgrade } '
80- info (text )
81- return text
82-
83-
8467def main () -> int :
8568 """
8669 This can either be run as the compiled and installed application: python setup.py install
@@ -97,18 +80,16 @@ def main() -> int:
9780
9881 _log_sys_info ()
9982
100- ttui .global_header = 'Archinstall'
101-
10283 if not arch_config_handler .args .offline :
10384 _check_online ()
10485 _fetch_arch_db ()
10586
10687 if not arch_config_handler .args .skip_version_check :
107- new_version = check_version_upgrade ()
88+ upgrade = check_version_upgrade ()
10889
109- if new_version :
110- ttui . global_header = f' { ttui . global_header } { new_version } '
111- info (new_version )
90+ if upgrade :
91+ text = tr ( 'New version available' ) + f': { upgrade } '
92+ info (text )
11293 time .sleep (3 )
11394
11495 if running_from_host ():
@@ -135,9 +116,6 @@ def run_as_a_module() -> None:
135116 except Exception as e :
136117 exc = e
137118 finally :
138- # restore the terminal to the original state
139- Tui .shutdown ()
140-
141119 if exc :
142120 err = '' .join (traceback .format_exception (exc ))
143121 error (err )
@@ -159,7 +137,6 @@ def run_as_a_module() -> None:
159137 'Language' ,
160138 'Pacman' ,
161139 'SysInfo' ,
162- 'Tui' ,
163140 'arch_config_handler' ,
164141 'debug' ,
165142 'disk_layouts' ,
0 commit comments