diff options
| author | Antoine Cotten <hello@acotten.com> | 2024-09-11 11:22:21 +0200 |
|---|---|---|
| committer | Antoine Cotten <hello@acotten.com> | 2024-09-11 18:27:53 +0200 |
| commit | b64c1d036ffb9a4c4eaaea056e132775de62fc1d (patch) | |
| tree | 584b2cdfc1d09b6fc5449ec8d7520dc74b5f22c5 /pkgs | |
| parent | f4f18f3d7229845e1c9d517457b7a0b90a38b728 (diff) | |
tools: fix darwin-rebuild changelog
The script returns early when $systemConfig is empty, which prevents the
changelog from being displayed.
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/nix-tools/darwin-rebuild.sh | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pkgs/nix-tools/darwin-rebuild.sh b/pkgs/nix-tools/darwin-rebuild.sh index b88858d..aa06686 100644 --- a/pkgs/nix-tools/darwin-rebuild.sh +++ b/pkgs/nix-tools/darwin-rebuild.sh @@ -203,7 +203,7 @@ if [ "$action" = edit ]; then fi fi -if [ "$action" = switch ] || [ "$action" = build ] || [ "$action" = check ]; then +if [ "$action" = switch ] || [ "$action" = build ] || [ "$action" = check ] || [ "$action" = changelog ]; then echo "building the system configuration..." >&2 if [ -z "$flake" ]; then systemConfig="$(nix-build '<darwin>' "${extraBuildFlags[@]}" -A system)" @@ -252,11 +252,7 @@ if [ "$action" = switch ] || [ "$action" = activate ] || [ "$action" = rollback fi if [ "$action" = changelog ]; then - echo >&2 - echo "[1;1mCHANGELOG[0m" >&2 - echo >&2 - head -n 32 "$systemConfig/darwin-changes" - echo >&2 + ${PAGER:-less} -- "$systemConfig/darwin-changes" fi if [ "$action" = check ]; then |
