From 38e5b4a4a3a4770b89cf63a31f475d9f5814c9ca 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` (cherry picked from commit 3a2fc9ce1dd3b176bdef257be75439bde33c210a) --- 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 e13d92f8efbe..4af062bd0c5e 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -124,7 +124,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 () {