From c24f744cd3a53d6297be61fa8329a6b660fbaa24 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 1 Aug 2017 22:59:19 +0200 Subject: [PATCH] activation-checks: show initial changelog --- modules/system/activation-checks.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/modules/system/activation-checks.nix b/modules/system/activation-checks.nix index 3ec3f52c..279cc6ea 100644 --- a/modules/system/activation-checks.nix +++ b/modules/system/activation-checks.nix @@ -4,15 +4,18 @@ with lib; let darwinChanges = '' + darwinChanges=/dev/null if test -e /run/current-system/darwin-changes; then - darwinChanges=$(diff --changed-group-format='%>' --unchanged-group-format= /run/current-system/darwin-changes $systemConfig/darwin-changes 2> /dev/null) || true - if test -n "$darwinChanges"; then - echo >&2 - echo "CHANGELOG" >&2 - echo >&2 - echo "$darwinChanges" >&2 - echo >&2 - fi + darwinChanges=/run/current-system/darwin-changes + fi + + darwinChanges=$(diff --changed-group-format='%>' --unchanged-group-format= /run/current-system/darwin-changes $systemConfig/darwin-changes 2> /dev/null) || true + if test -n "$darwinChanges"; then + echo >&2 + echo "CHANGELOG" >&2 + echo >&2 + echo "$darwinChanges" >&2 + echo >&2 fi '';