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

Merge pull request #14075 from fzakaria/fzakaria/shellcheck-functional-dump-db

shellcheck fix functional/dump-db.sh
This commit is contained in:
Jörg Thalheim 2025-09-25 19:31:49 +02:00 committed by GitHub
commit e3d62f35ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,19 +8,18 @@ needLocalStore "--dump-db requires a local store"
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" ];
nix-store --dump-db > $TEST_ROOT/dump2
cmp $TEST_ROOT/dump $TEST_ROOT/dump2
nix-store --dump-db > "$TEST_ROOT"/dump2
cmp "$TEST_ROOT"/dump "$TEST_ROOT"/dump2