Skip to content

Commit 07cf67a

Browse files
committed
Install Nix: add createStore()
rm old mkdir $dest/store
1 parent 348000f commit 07cf67a

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

scripts/install-nix-from-closure.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -630,15 +630,28 @@ installNix() {
630630
fi
631631
fi
632632
}
633-
}
634-
635-
}
636-
echo "performing a single-user installation of Nix..." >&2
637633

634+
createStore() {
635+
trap createStoreRevert 1
636+
createStoreRevert() {
637+
error "
638638
639+
Script tried to create '$dest/store', but it already exists.
640+
We do checks '$dest/store' existence before installation.
641+
Probaly something went wrong with the installation script.
639642
640-
mkdir -p $dest/store
643+
Please:
644+
* gather information of your setup conditions
645+
* search does BUG exists
646+
* make further actions
647+
"
648+
}
649+
mkdir -p "$dest"/store
650+
}
651+
}
641652

653+
}
654+
echo "performing a single-user installation of Nix..." >&2
642655
printf "copying Nix to %s..." "${dest}/store" >&2
643656

644657
for i in $(cd "$self/store" >/dev/null && echo ./*); do

0 commit comments

Comments
 (0)