diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index d0d5307a804e..2725cea59960 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -139,7 +139,7 @@ sub GrubFs { if ($status != 0) { die "Failed to retreive subvolume info for @{[$fs->device]}"; } - my @subvols = join("", @info) =~ m/Name:[ \t\n]([^ \t\n]*)/; + my @subvols = join("", @info) =~ m/Name:[ \t\n]*([^ \t\n]*)/; if ($#subvols > 0) { die "Btrfs subvol name for @{[$fs->device]} listed multiple times in mount\n" } elsif ($#subvols == 0) {