Skip to content

Commit 5c3af31

Browse files
committed
fix(hosts/btrfs): sort subvolumes before removing
This ensures parents are removed first
1 parent c3cf410 commit 5c3af31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hosts/common/optional/ephemeral-btrfs.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
echo "Skipping wipe"
2020
else
2121
echo "Cleaning root subvolume"
22-
btrfs subvolume list -o "$MNTPOINT/root" | cut -f9 -d ' ' |
22+
btrfs subvolume list -o "$MNTPOINT/root" | cut -f9 -d ' ' | sort |
2323
while read -r subvolume; do
2424
btrfs subvolume delete "$MNTPOINT/$subvolume"
2525
done && btrfs subvolume delete "$MNTPOINT/root"

0 commit comments

Comments
 (0)