feat(rebuild): #56 human rebuild errors point at doctor
Some checks failed
Check / eval (push) Has been cancelled

sys-update / sys-rebuild / home-update tee output and on failure print
the last 40 log lines plus nomarchy-doctor + RECOVERY.md. theme-sync HM
switch failure notify/die text matches. Close #56.

Verified: V1 (HM rebuild; failure-footer shell smoke).
This commit is contained in:
Bernardo Magri
2026-07-10 08:45:33 +01:00
parent e81529c1bb
commit a102dff508
4 changed files with 81 additions and 25 deletions

View File

@@ -361,8 +361,15 @@ def run_switch() -> None:
notify("Applying changes — rebuilding the desktop…", persistent=True)
result = subprocess.run(argv) # stream output to the caller's terminal
if result.returncode != 0:
notify("Rebuild FAILED — see terminal / journal", urgency="critical")
die("rebuild failed (state file already updated; fix and re-run)")
# BACKLOG #56: point at doctor, not a silent wall of Nix noise.
notify(
"Rebuild FAILED — scroll up for last lines; run nomarchy-doctor",
urgency="critical",
)
die(
"rebuild failed (state already written; fix and re-run). "
"Diagnose: nomarchy-doctor. Recovery: docs/RECOVERY.md"
)
notify("Changes applied ✓")
# Waybar runs from Hyprland's exec-once (not a systemd unit HM would
# restart on switch), so nudge the running bar onto the freshly rebuilt