Skip to content

Commit

Permalink
Fix the isDaemonNewer check
Browse files Browse the repository at this point in the history
- Don’t hardcode the “newer” version
- Remove an ill-placed `return`

(cherry picked from commit 3a2fc9c)
  • Loading branch information
thufschmitt authored and Ericson2314 committed Nov 30, 2021
1 parent 0e3f62f commit 38e5b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/common.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 38e5b4a

Please sign in to comment.