Merge pull request #246746 from mode89/fix/nixos-install-with-non-empty-mnt

nixos-install: fix removal of non-empty `/mnt`
This commit is contained in:
Pol Dellaiera
2023-08-02 18:41:46 +02:00
committed by GitHub
@@ -206,7 +206,7 @@ if [[ -z $noBootLoader ]]; then
mount --rbind --mkdir / "$mountPoint"
mount --make-rslave "$mountPoint"
/run/current-system/bin/switch-to-configuration boot
umount -R "$mountPoint" && rmdir "$mountPoint"
umount -R "$mountPoint" && (rmdir "$mountPoint" 2>/dev/null || true)
EOF
)"
fi