Fix the isDaemonNewer check

- Don’t hardcode the “newer” version
- Remove an ill-placed `return`
This commit is contained in:
regnat 2021-10-14 15:42:54 +02:00
parent 4c0cde95ad
commit 3a2fc9ce1d

View file

@ -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 () {