Skip to content

Commit 01a9516

Browse files
committed
Hiding the menu option for bootloader when --skip-boot is given. Still setting it default to None to avoid it sneaking into the config file or being set behind the scenes causing if statements to trigger.
1 parent f0392e8 commit 01a9516

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

archinstall/lib/global_menu.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self, arch_config: ArchConfig) -> None:
5353
super().__init__(self._item_group, config=arch_config)
5454

5555
def _get_menu_options(self) -> list[MenuItem]:
56-
return [
56+
menu_options = [
5757
MenuItem(
5858
text=tr('Archinstall language'),
5959
action=self._select_archinstall_language,
@@ -91,7 +91,7 @@ def _get_menu_options(self) -> list[MenuItem]:
9191
value=Bootloader.get_default(),
9292
action=self._select_bootloader,
9393
preview_action=self._prev_bootloader,
94-
mandatory=False if arch_config_handler.args.skip_boot else True,
94+
mandatory=True,
9595
key='bootloader',
9696
),
9797
MenuItem(
@@ -197,6 +197,14 @@ def _get_menu_options(self) -> list[MenuItem]:
197197
),
198198
]
199199

200+
if arch_config_handler.args.skip_boot:
201+
for index, item in enumerate(menu_options):
202+
if item.text == tr('Bootloader'):
203+
menu_options.pop(index)
204+
break
205+
206+
return menu_options
207+
200208
def _safe_config(self) -> None:
201209
# data: dict[str, Any] = {}
202210
# for item in self._item_group.items:

0 commit comments

Comments
 (0)