From 3a2fc9ce1dd3b176bdef257be75439bde33c210a Mon Sep 17 00:00:00 2001 From: regnat Date: Thu, 14 Oct 2021 15:42:54 +0200 Subject: [PATCH] Fix the `isDaemonNewer` check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Don’t hardcode the “newer” version - Remove an ill-placed `return` --- tests/common.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common.sh.in b/tests/common.sh.in index 7daab2460..08f5e0a77 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -126,7 +126,7 @@ isDaemonNewer () { [[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0 local requiredVersion="$1" local daemonVersion=$($NIX_DAEMON_PACKAGE/bin/nix-daemon --version | cut -d' ' -f3) - return [[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''2.4''") -ge 0 ]] + [[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''$requiredVersion''") -ge 0 ]] } requireDaemonNewerThan () {