Skip to content

Commit c20787a

Browse files
fin444mergify[bot]
authored andcommitted
don't attempt to export zpool if there is none
1 parent ce18c08 commit c20787a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ if [ ${copy_host_keys-n} = "y" ]; then
510510
done
511511
fi
512512
nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system"
513-
if command -v zpool >/dev/null; then
513+
if command -v zpool >/dev/null && [ "\$(zpool list)" != "no pools available" ]; then
514514
# we always want to export the zfs pools so people can boot from it without force import
515515
umount -Rv /mnt/
516516
zpool export -a || true

0 commit comments

Comments
 (0)