aboutsummaryrefslogtreecommitdiff
path: root/tests/referrers.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/referrers.sh')
-rw-r--r--tests/referrers.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/referrers.sh b/tests/referrers.sh
index e57b2d8e3..0a1c86e0a 100644
--- a/tests/referrers.sh
+++ b/tests/referrers.sh
@@ -30,7 +30,7 @@ echo "collecting garbage..."
ln -sfn $reference "$NIX_STATE_DIR"/gcroots/ref
nix-store --gc
-if test "$(sqlite3 ./test-tmp/db/db.sqlite 'select count(*) from Refs')" -ne 0; then
+if [ -n "$(type -p sqlite3)" -a "$(sqlite3 ./test-tmp/db/db.sqlite 'select count(*) from Refs')" -ne 0 ]; then
echo "referrers not cleaned up"
exit 1
fi