aboutsummaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authorjade <lix@jade.fyi>2024-06-10 23:22:05 +0000
committerGerrit Code Review <gerrit@localhost>2024-06-10 23:22:05 +0000
commitf432e464dd1a11ef47b1487f1913cd9b5256c189 (patch)
tree08f208617b5ee583ba8077178042149fddbf8156 /tests/functional
parenta986a8dfa1c5896de8acfc603ff71a51f629bdc8 (diff)
parenta05de58ebd581c47f4f985efab7236574aa0f842 (diff)
Merge "tests: fix daemon version in isDaemonNewer function" into main
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/common/vars-and-functions.sh.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/functional/common/vars-and-functions.sh.in b/tests/functional/common/vars-and-functions.sh.in
index 3b343b720..bd1990973 100644
--- a/tests/functional/common/vars-and-functions.sh.in
+++ b/tests/functional/common/vars-and-functions.sh.in
@@ -146,7 +146,8 @@ fi
isDaemonNewer () {
[[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0
local requiredVersion="$1"
- local daemonVersion=$($NIX_DAEMON_PACKAGE/bin/nix daemon --version | cut -d' ' -f3)
+ local versionOutput=$($NIX_DAEMON_PACKAGE/bin/nix daemon --version)
+ local daemonVersion=${versionOutput##* }
[[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''$requiredVersion''") -ge 0 ]]
}