fix(service): unescape plist XML, surface both launchctl streams, clear status fields when not installed

Three review findings on task 4:
- read_plist_fields now parses the plist properly via the plist crate
  (already a transitive dep of service-manager, promoted to direct) instead
  of slicing raw XML, so a PATH or program path containing & or < no longer
  round-trips as literal &amp;/&lt; through cli::service::render_status.
- launchctl's error path now includes both stdout and stderr, trimmed and
  joined only on non-empty parts, so a failure never surfaces as
  "launchctl load failed: " with nothing after the colon.
- status() now returns identical None fields (program, path_env,
  snapshotted, pid) whether the plist is absent or the plist exists but the
  crate reports NotInstalled (e.g. written but never loaded, or booted out
  of band) - extracted via a shared not_installed_status/build_status split
  so both paths run the same code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EGntTHCW3sEPy1VBRopNNp
This commit is contained in:
2026-08-01 00:09:59 +02:00
co-authored by Claude Opus 5
parent 1d73057444
commit 41acc3e21a
4 changed files with 161 additions and 37 deletions
+1
View File
@@ -34,3 +34,4 @@ async-trait = "0.1"
tempfile = "3"
tokio-test = "0.4"
service-manager = "0.11"
plist = "1"