aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-07-12 16:09:25 +0200
committerEelco Dolstra <edolstra@gmail.com>2022-07-12 16:15:21 +0200
commitc9d406ba04b81c21f187348fe52fa6e1f95ad78c (patch)
tree739d5d7578e129afe397a6fb4cc5a36d265c2c24
parentf6a434c8a4d76973a26e8cbd938be2beb29696de (diff)
Fix --no-daemon installation
It was accidentally triggering the auto-chroot code path because /nix/var/nix didn't exist. Fixes #6790.
-rw-r--r--scripts/install-nix-from-closure.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index d543b4463..cd3cf6670 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -148,7 +148,9 @@ if ! [ -w "$dest" ]; then
exit 1
fi
-mkdir -p "$dest/store"
+# The auto-chroot code in openFromNonUri() checks for the
+# non-existence of /nix/var/nix, so we need to create it here.
+mkdir -p "$dest/store" "$dest/var/nix"
printf "copying Nix to %s..." "${dest}/store" >&2
# Insert a newline if no progress is shown.