Unverified Commit d61cc625 authored by Andrey Krainyak's avatar Andrey Krainyak
Browse files

nixos-install: fix removal of non-empty `/mnt`

After building the target system, `nixos-install` tries to remove `/mnt`
on the target filesystem. And the script may fail without any explanation,
if `/mnt` isn't empty.

This commit makes the installation process carry on even if there are
files under `/mnt`.

See https://github.com/NixOS/nixpkgs/issues/244643.
parent 3580ac6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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