From dbebe8cf37c24e7c3bcb51f056c72b033706c033 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sat, 30 Oct 2021 17:46:25 +0200 Subject: Raising DiskError if subvolumes cannot be created. --- archinstall/lib/disk/btrfs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/disk/btrfs.py b/archinstall/lib/disk/btrfs.py index 4fe890e5..eaa73af8 100644 --- a/archinstall/lib/disk/btrfs.py +++ b/archinstall/lib/disk/btrfs.py @@ -47,4 +47,5 @@ def create_subvolume(installation, location :Union[pathlib.Path, str]) -> bool: @location: a localized string or path inside the installation / or /boot for instance without specifying /mnt/boot """ log(f"Creating a subvolume on {installation.target}/{str(location)}", level=logging.INFO) - SysCommand(f"btrfs subvolume create {installation.target}/{str(location)}") \ No newline at end of file + if (cmd := SysCommand(f"btrfs subvolume create {installation.target}/{str(location)}")).exit_code != 0: + raise DiskError(f"Could not create a subvolume at {installation.target}/{str(location)}: {cmd}") \ No newline at end of file -- cgit v1.2.3-70-g09d2