1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

activation-checks: remove set +e

This commit is contained in:
Daiderd Jordan 2017-07-23 19:07:04 +02:00
parent b5e0b273c4
commit 6a2715dcb6
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -5,7 +5,7 @@ with lib;
let
darwinChanges = ''
if test -e /run/current-system/darwin-changes; then
darwinChanges=$(grep -v -f /run/current-system/darwin-changes $systemConfig/darwin-changes 2> /dev/null)
darwinChanges=$(grep -v -f /run/current-system/darwin-changes $systemConfig/darwin-changes 2> /dev/null) || true
if test -n "$darwinChanges"; then
echo >&2
echo "CHANGELOG" >&2
@ -17,7 +17,7 @@ let
'';
buildUsers = optionalString config.services.nix-daemon.enable ''
buildUser=$(dscl . -read /Groups/nixbld GroupMembership 2>&1 | awk '/^GroupMembership: / {print $2}')
buildUser=$(dscl . -read /Groups/nixbld GroupMembership 2>&1 | awk '/^GroupMembership: / {print $2}') || true
if [ -z $buildUser ]; then
echo "error: Using the nix-daemon requires build users, aborting activation" >&2
echo "Create the build users or disable the daemon:" >&2
@ -79,8 +79,6 @@ in
config = {
system.activationScripts.checks.text = ''
set +e
${darwinChanges}
${buildUsers}
${nixPath}
@ -89,8 +87,6 @@ in
echo "ok" >&2
exit 0
fi
set -e
'';
};