1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-14 21:11:04 +01:00

tests: Make clearStore more resilient

Let it work if `$NIX_STORE_DIR` doesn’t exist
This commit is contained in:
Théophane Hufschmitt 2022-04-11 10:20:37 +02:00
parent ef644ec753
commit 988c51de7f

View file

@ -66,7 +66,7 @@ clearProfiles() {
clearStore() {
echo "clearing store..."
chmod -R +w "$NIX_STORE_DIR"
chmod -R +w "$NIX_STORE_DIR" || true
rm -rf "$NIX_STORE_DIR"
mkdir "$NIX_STORE_DIR"
rm -rf "$NIX_STATE_DIR"