fix(install): silence best-effort launchctl stderr on macOS uninstall #140

Merged
longjacksonle merged 1 commit from fix/VA-89-quiet-launchctl into main 2026-07-14 19:16:38 +02:00

What

Small UX fix found during the on-Mac install verification of #138. launchctl unload prints Unload failed: 5: Input/output error to stderr when the job is not currently loaded - expected, but it looks like an error on a clean (no-op) vervain-agent uninstall. The installer already treats unload as best-effort and ignores the exit status, so this routes launchctl's stderr to /dev/null whenever allow_failure is set. Mandatory calls (the load on install) are unaffected and still surface errors.

Verified on a Mac: uninstall --install-type user on a clean system now completes quietly. 5 install_macos tests + clippy/fmt clean.

## What Small UX fix found during the on-Mac install verification of #138. `launchctl unload` prints `Unload failed: 5: Input/output error` to stderr when the job is not currently loaded - expected, but it looks like an error on a clean (no-op) `vervain-agent uninstall`. The installer already treats unload as best-effort and ignores the exit status, so this routes launchctl's stderr to `/dev/null` whenever `allow_failure` is set. Mandatory calls (the `load` on install) are unaffected and still surface errors. Verified on a Mac: `uninstall --install-type user` on a clean system now completes quietly. 5 `install_macos` tests + clippy/fmt clean.
fix(install): silence best-effort launchctl stderr on macOS uninstall
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 4m53s
Create release / Create release from merged PR (pull_request) Has been skipped
32b918bad2
`launchctl unload` prints `Unload failed: 5: Input/output error` to stderr when the job is not currently loaded, which is expected but reads as an error on a clean (no-op) uninstall. The installer already treats unload as best-effort and ignores the exit status, so route its stderr to /dev/null whenever allow_failure is set. Successful/mandatory calls are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFsMi3Vmf3pCc7mBdhZqoV
longjacksonle deleted branch fix/VA-89-quiet-launchctl 2026-07-14 19:16:38 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-agent!140
No description provided.