1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

tools: fix darwin-rebuild changelog

The script returns early when $systemConfig is empty, which prevents the
changelog from being displayed.
This commit is contained in:
Antoine Cotten 2024-09-11 11:22:21 +02:00
parent f4f18f3d72
commit b64c1d036f
No known key found for this signature in database

View file

@ -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 "CHANGELOG" >&2
echo >&2
head -n 32 "$systemConfig/darwin-changes"
echo >&2
${PAGER:-less} -- "$systemConfig/darwin-changes"
fi
if [ "$action" = check ]; then