Offer to send the log to us when an install or update fails

When update or install.sh fails and there's a terminal, ask whether to
send its log to the CoreDesktop team, with the option of reading exactly
what would be sent first. Nothing is sent without a yes, and nothing is
asked without a terminal. The new report command sends a log later
(report, report FILE) or shows what would be sent (report --view).

Before sending, the log is cleaned of terminal codes, and the home
folder, user name, host name, email addresses, IPv4 addresses and
Tailscale names are replaced. CoreDesktop's version, the kernel's, the
failed steps and sibling versions go along with it. The request format
the receiver on federated.sh implements is described at the top of
report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 11:28:53 -07:00
co-authored by Claude Opus 5.5
parent a82bbfc2e1
commit bd82063bbb
6 changed files with 399 additions and 6 deletions
+6 -1
View File
@@ -94,6 +94,7 @@ install_script "$COREDESKTOP/sibling" ~/.local/bin/sibling
install_script "$COREDESKTOP/version" ~/.local/bin/version
install_script "$COREDESKTOP/configure" ~/.local/bin/configure
install_script "$COREDESKTOP/audit" ~/.local/bin/audit
install_script "$COREDESKTOP/report" ~/.local/bin/report
if [[ -z "$UPDATE_REEXECED" ]]; then
export UPDATE_REEXECED=1
@@ -144,7 +145,11 @@ done
if (( ${#FAILED[@]} > 0 )); then
echo "Done, with errors in: ${FAILED[*]}"
[ -n "$UPDATE_LOG" ] && echo "The full output is in $UPDATE_LOG"
if [ -n "$UPDATE_LOG" ]; then
echo "The full output is in $UPDATE_LOG"
# Ask, on the terminal if there is one, whether to send it to us
[ -x ~/.local/bin/report ] && ~/.local/bin/report --offer "$UPDATE_LOG" "${FAILED[@]}"
fi
exit 1
fi