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

shellcheck fix: tests/functional/export.sh

This commit is contained in:
Farid Zakaria 2025-09-25 10:36:12 -07:00
parent 9e3c502521
commit 230da1cbe7
2 changed files with 9 additions and 8 deletions

View file

@ -8,11 +8,12 @@ clearStore
outPath=$(nix-build dependencies.nix --no-out-link)
nix-store --export $outPath > $TEST_ROOT/exp
nix-store --export "$outPath" > "$TEST_ROOT"/exp
nix-store --export $(nix-store -qR $outPath) > $TEST_ROOT/exp_all
# shellcheck disable=SC2046
nix-store --export $(nix-store -qR "$outPath") > "$TEST_ROOT"/exp_all
if nix-store --export $outPath >/dev/full ; then
if nix-store --export "$outPath" >/dev/full ; then
echo "exporting to a bad file descriptor should fail"
exit 1
fi
@ -20,7 +21,7 @@ fi
clearStore
if nix-store --import < $TEST_ROOT/exp; then
if nix-store --import < "$TEST_ROOT"/exp; then
echo "importing a non-closure should fail"
exit 1
fi
@ -28,13 +29,14 @@ fi
clearStore
nix-store --import < $TEST_ROOT/exp_all
nix-store --import < "$TEST_ROOT"/exp_all
nix-store --export $(nix-store -qR $outPath) > $TEST_ROOT/exp_all2
# shellcheck disable=SC2046
nix-store --export $(nix-store -qR "$outPath") > "$TEST_ROOT"/exp_all2
clearStore
# Regression test: the derivers in exp_all2 are empty, which shouldn't
# cause a failure.
nix-store --import < $TEST_ROOT/exp_all2
nix-store --import < "$TEST_ROOT"/exp_all2