Repo guards (repolist) + PeaZip flavor guard #14

Merged
yuri merged 4 commits from fix/repo-and-peazip-guards into main 2026-11-11 15:48:11 +01:00
Showing only changes of commit ee10829452 - Show all commits
+14 -6
View File
@@ -173,18 +173,26 @@ ui_quiet_run() {
local rc=0
wait "$pid" || rc=$?
printf '\r%*s\r' 100 '' >&2
# ANSI erase-line: wipes the live line without leaving trailing spaces
# (a 100-space wipe left a visible gap when the summary was shorter)
printf '\r\033[K' >&2
if (( rc == 0 )); then
n=$(sed -n "$((before+1)),\$p" "$log" 2>/dev/null | grep -ac '^Installing' || true)
local plural="s"
(( n == 1 )) && plural=""
local count_txt=""
if (( n > 0 )); then
local plural="s"
(( n == 1 )) && plural=""
count_txt=" (${n} package${plural})"
fi
# n == 0 means nothing new was installed (idempotent re-run /
# deps already present): print the message without a count.
if (( depth == 256 )); then
printf '\033[48;5;34m \033[0m %s (%s package%s)\n' "$msg" "$n" "$plural" >&2
printf '\033[48;5;34m \033[0m %s%s\n' "$msg" "$count_txt" >&2
elif (( depth == 16 )); then
printf '\033[42m \033[0m %s (%s package%s)\n' "$msg" "$n" "$plural" >&2
printf '\033[42m \033[0m %s%s\n' "$msg" "$count_txt" >&2
else
ok "$msg (${n} package${plural})"
ok "$msg${count_txt}"
fi
return 0
else