index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/disk/user_guides.py | 10 |
diff --git a/archinstall/lib/disk/user_guides.py b/archinstall/lib/disk/user_guides.py index 25db14ea..8acb8cd2 100644 --- a/archinstall/lib/disk/user_guides.py +++ b/archinstall/lib/disk/user_guides.py @@ -1,6 +1,7 @@ from __future__ import annotations import logging from typing import Optional, Dict, Any, List, TYPE_CHECKING + # https://stackoverflow.com/a/39757388/929999 if TYPE_CHECKING: from .blockdevice import BlockDevice @@ -8,6 +9,7 @@ if TYPE_CHECKING: from .helpers import sort_block_devices_based_on_performance, select_largest_device, select_disk_larger_than_or_close_to from ..hardware import has_uefi from ..output import log +from ..menu import Menu def suggest_single_disk_layout(block_device :BlockDevice, default_filesystem :Optional[str] = None, @@ -22,7 +24,9 @@ def suggest_single_disk_layout(block_device :BlockDevice, using_home_partition = False if default_filesystem == 'btrfs': - using_subvolumes = input('Would you like to use BTRFS subvolumes with a default structure? (Y/n): ').strip().lower() in ('', 'y', 'yes') + prompt = 'Would you like to use BTRFS subvolumes with a default structure?' + choice = Menu(prompt, ['yes', 'no'], skip=False, default_option='yes').run() + using_subvolumes = choice == 'yes' layout = { block_device.path : { @@ -76,7 +80,9 @@ def suggest_single_disk_layout(block_device :BlockDevice, layout[block_device.path]['partitions'][-1]['start'] = '513MiB' if not using_subvolumes and block_device.size >= MIN_SIZE_TO_ALLOW_HOME_PART: - using_home_partition = input('Would you like to create a separate partition for /home? (Y/n): ').strip().lower() in ('', 'y', 'yes') + prompt = 'Would you like to create a separate partition for /home?' + choice = Menu(prompt, ['yes', 'no'], skip=False, default_option='yes').run() + using_home_partition = choice == 'yes' # Set a size for / (/root) if using_subvolumes or block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART or not using_home_partition: |