mirror of
https://github.com/NixOS/nix
synced 2025-06-28 13:41:15 +02:00
Fix version check
This commit is contained in:
parent
b68d7396ca
commit
361a5783ef
1 changed files with 4 additions and 4 deletions
|
@ -182,10 +182,10 @@ if [[ $(uname) == Linux ]] && [[ -L /proc/self/ns/user ]] && unshare --user true
|
|||
fi
|
||||
|
||||
isDaemonNewer () {
|
||||
[[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0
|
||||
local requiredVersion="$1"
|
||||
local daemonVersion=$($NIX_DAEMON_PACKAGE/bin/nix daemon --version | cut -d' ' -f3)
|
||||
[[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''$requiredVersion''") -ge 0 ]]
|
||||
[[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0
|
||||
local requiredVersion="$1"
|
||||
local daemonVersion=$($NIX_DAEMON_PACKAGE/bin/nix daemon --version | sed 's/.*) //')
|
||||
[[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''$requiredVersion''") -ge 0 ]]
|
||||
}
|
||||
|
||||
skipTest () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue