about summary refs log tree commit diff
path: root/nixos/modules/security/setuid-wrappers.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/security/setuid-wrappers.nix')
-rw-r--r--nixos/modules/security/setuid-wrappers.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/security/setuid-wrappers.nix b/nixos/modules/security/setuid-wrappers.nix
index 4cdc1023baab..373afffd3fb5 100644
--- a/nixos/modules/security/setuid-wrappers.nix
+++ b/nixos/modules/security/setuid-wrappers.nix
@@ -97,8 +97,7 @@ in
           }:
 
           ''
-            source=${if source != "" then source else "$(PATH=$SETUID_PATH type -tP ${program})"}
-            if test -z "$source"; then
+            if ! source=${if source != "" then source else "$(PATH=$SETUID_PATH type -tP ${program})"}; then
                 # If we can't find the program, fall back to the
                 # system profile.
                 source=/nix/var/nix/profiles/default/bin/${program}