fix: actionable remedy for root-created per-user config dir

A pmg run as root with a preserved HOME (GitHub runners, sudo -E, su
without -) creates the invoking user's ~/.config/safedep as root-owned,
and event-log init then fail-closes every later non-root command.
Make that state self-solvable:

- event-log init permission errors exit with a usefulerror naming the
  likely cause and the chown fix instead of a bare fatal
- pmg setup doctor probes event-log dir writability and reports the
  same fix via a new per-result Fix override
- document the mechanism and remedy in system-install.md, along with
  the binary ownership requirements for --system
- consolidate this branch's doctor tests into doctor_test.go
This commit is contained in:
Sahilb315
2026-07-14 02:40:08 +05:30
parent 1b17eb295a
commit 479f546ebc
5 changed files with 139 additions and 29 deletions
+2
View File
@@ -14,6 +14,8 @@ type CheckResult struct {
Status CheckStatus
Message string
ImpliesInterception bool
// Fix overrides the check's static fix hint for this specific result.
Fix string
}
type Check struct {