summary refs log tree commit diff
path: root/nixos/tests/common
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/common')
-rw-r--r--nixos/tests/common/resolver.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/tests/common/resolver.nix b/nixos/tests/common/resolver.nix
index 3ddf730668c..609058a7374 100644
--- a/nixos/tests/common/resolver.nix
+++ b/nixos/tests/common/resolver.nix
@@ -63,7 +63,7 @@
             matched = builtins.match "[ \t]+(${reHost})(.*)" str;
             continue = lib.singleton (lib.head matched)
                     ++ matchAliases (lib.last matched);
-          in if matched == null then [] else continue;
+          in lib.optional (matched != null) continue;
 
           matchLine = str: let
             result = builtins.match "[ \t]*(${reIp})[ \t]+(${reHost})(.*)" str;