1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

shellcheck fix functional/dump-db.sh

Add back the path variable
This commit is contained in:
Farid Zakaria 2025-09-24 19:15:53 -07:00 committed by Jörg Thalheim
parent bdd3eb400a
commit 6e2c11e296

View file

@ -8,19 +8,18 @@ needLocalStore "--dump-db requires a local store"
clearStore clearStore
path=$(nix-build dependencies.nix -o $TEST_ROOT/result) nix-build dependencies.nix -o "$TEST_ROOT"/result
deps="$(nix-store -qR "$TEST_ROOT"/result)"
deps="$(nix-store -qR $TEST_ROOT/result)" nix-store --dump-db > "$TEST_ROOT"/dump
nix-store --dump-db > $TEST_ROOT/dump rm -rf "$NIX_STATE_DIR"/db
rm -rf $NIX_STATE_DIR/db nix-store --load-db < "$TEST_ROOT"/dump
nix-store --load-db < $TEST_ROOT/dump deps2="$(nix-store -qR "$TEST_ROOT"/result)"
deps2="$(nix-store -qR $TEST_ROOT/result)"
[ "$deps" = "$deps2" ]; [ "$deps" = "$deps2" ];
nix-store --dump-db > $TEST_ROOT/dump2 nix-store --dump-db > "$TEST_ROOT"/dump2
cmp $TEST_ROOT/dump $TEST_ROOT/dump2 cmp "$TEST_ROOT"/dump "$TEST_ROOT"/dump2