Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-10-30 17:46:25 +0200
committerAnton Hvornum <anton@hvornum.se>2021-10-30 17:46:25 +0200
commitdbebe8cf37c24e7c3bcb51f056c72b033706c033 (patch)
tree7867ba15cd96c203f41f4201f80d12eef9504c1d /archinstall
parent9f9c637bfd2e9c8aff3e8fb0777db4e56d5ceedd (diff)
Raising DiskError if subvolumes cannot be created.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk/btrfs.py3
1 files changed, 2 insertions, 1 deletions
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