report what a section actually installed, not what it was asked for

The summary claimed credit for everything in a section's list, including the
packages it had just decided to leave alone — so a run that installed nothing
still ended with "Command-line tools: lazydocker lazygit starship fastfetch".
The announce above it said "nothing, all present" in the same breath.

pkg_install and tools_install now record LAST_INSTALLED and LAST_KEPT, and
summarise_last turns those into one honest line:

  Core packages installed: btop tmux (17 already present)
  Command-line tools: already present, nothing installed

Verified all three shapes — everything present, nothing present, and mixed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-12 17:34:34 +00:00
co-authored by Claude Opus 5
parent dd655577e3
commit a5ef9f7662
3 changed files with 28 additions and 3 deletions
+3
View File
@@ -113,6 +113,9 @@ tools_install() {
if tool_is_installed "$tool"; then present+=("$tool"); else missing+=("$tool"); fi
done
LAST_INSTALLED=("${missing[@]}")
LAST_KEPT=("${present[@]}")
info "$label — installs what is missing, keeps what you already have"
((${#present[@]})) && echo " already here: ${present[*]}"