From b1bd273f822151bb654df51bfecca9a3cc357e50 Mon Sep 17 00:00:00 2001 From: brurmonemt Date: Fri, 19 Jun 2026 22:23:18 -0500 Subject: [PATCH 1/3] Fix ValueError exception when no disks are detected in the disk menu in lib/disk/disk_menu.py, the menu items are created using info from a list called "devices" (device_handler.devices). when no block devices are detected, the list is empty, creating zero MenuItems, and causing the following ValueError: ValueError: Menu must have at least one item this change checks if the length of the list is shorter than 1 (empty list) before constructing the menu. if the list is empty, the user will be notified that no disks were detected. otherwise, the menu is created and behaves as normal --- archinstall/lib/disk/disk_menu.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archinstall/lib/disk/disk_menu.py b/archinstall/lib/disk/disk_menu.py index f8e8e2e3f9..2d3e3b502b 100644 --- a/archinstall/lib/disk/disk_menu.py +++ b/archinstall/lib/disk/disk_menu.py @@ -311,6 +311,10 @@ def _preview_device_selection(item: MenuItem) -> str | None: devices = device_handler.devices + if len(devices) < 1: + await Notify(tr("No disks were detected. A disk is required to be able to install Arch Linux")).show() + return None + items = [ MenuItem( str(d.device_info.path), From e26c325d3868a4078db7c6b53c605da6f7b8b480 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 28 Jun 2026 21:18:14 +0200 Subject: [PATCH 2/3] Fixed ruff formatting issue --- archinstall/lib/disk/disk_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/disk/disk_menu.py b/archinstall/lib/disk/disk_menu.py index 2d3e3b502b..29a9a15af6 100644 --- a/archinstall/lib/disk/disk_menu.py +++ b/archinstall/lib/disk/disk_menu.py @@ -314,7 +314,7 @@ def _preview_device_selection(item: MenuItem) -> str | None: if len(devices) < 1: await Notify(tr("No disks were detected. A disk is required to be able to install Arch Linux")).show() return None - + items = [ MenuItem( str(d.device_info.path), From c61b5808b1f8ab84c9b2bd98647addff7e2d0c6b Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 28 Jun 2026 21:19:23 +0200 Subject: [PATCH 3/3] Fixed ruff formatting issue --- archinstall/lib/disk/disk_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/disk/disk_menu.py b/archinstall/lib/disk/disk_menu.py index 29a9a15af6..f89635affa 100644 --- a/archinstall/lib/disk/disk_menu.py +++ b/archinstall/lib/disk/disk_menu.py @@ -312,7 +312,7 @@ def _preview_device_selection(item: MenuItem) -> str | None: devices = device_handler.devices if len(devices) < 1: - await Notify(tr("No disks were detected. A disk is required to be able to install Arch Linux")).show() + await Notify(tr('No disks were detected. A disk is required to be able to install Arch Linux')).show() return None items = [