aboutsummaryrefslogtreecommitdiff
path: root/tests/store-ping.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-01-26 15:22:15 +0100
committerGitHub <noreply@github.com>2022-01-26 15:22:15 +0100
commit1fe3bfdeaf7c57e9f7044a22edfbdf6fb9629e9d (patch)
treed4260a27305bdc4b115f94073b14c4a2f3dfd6cd /tests/store-ping.sh
parentb0de24cc89803782fb25faedb28afc187e56a45d (diff)
parent3dc1418216d30274695c51ba47e05cf92789d4df (diff)
Merge pull request #5997 from NixOS/test-nix-store-ping
Fix the `store ping` test
Diffstat (limited to 'tests/store-ping.sh')
-rw-r--r--tests/store-ping.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/store-ping.sh b/tests/store-ping.sh
index 4e8c8b770..f9427cf0a 100644
--- a/tests/store-ping.sh
+++ b/tests/store-ping.sh
@@ -4,8 +4,9 @@ STORE_INFO=$(nix store ping 2>&1)
echo "$STORE_INFO" | grep "Store URL: ${NIX_REMOTE}"
-if isDaemonNewer "2.7pre20220126"; then
- echo "$STORE_INFO" | grep "Version: $($NIX_DAEMON_PACKAGE/bin/nix-daemon --version)"
+if [[ -v NIX_DAEMON_PACKAGE ]] && isDaemonNewer "2.7.0pre20220126"; then
+ DAEMON_VERSION=$($NIX_DAEMON_PACKAGE/bin/nix-daemon --version | cut -d' ' -f3)
+ echo "$STORE_INFO" | grep "Version: $DAEMON_VERSION"
fi
expect 127 NIX_REMOTE=unix:$PWD/store nix store ping || \