Don't silently ignore errors from the activation script

This commit is contained in:
Eelco Dolstra
2014-08-15 01:57:36 +02:00
parent 883fa4f920
commit 785ed2b528
3 changed files with 10 additions and 3 deletions

View File

@@ -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}