LaunchAgent scheduling fails when home directory is on non-boot volume
bug
<!--
WARNING: Issues with the template below removed will be closed!
-->
<!--
Thanks for helping make Pearcleaner better! Before you submit your issue, please make sure you follow the list below and check the appropriate boxes by putting an x inside the [ ]: [x]
-->
### New Issue Checklist
- [x] I updated Pearcleaner to the latest version and still observe the issue
- [x] I searched for [existing GitHub issues](https://github.com/alienator88/pearcleaner/issues)
- [x] OS Version: 26.3.1 (25D2128)
- [x] Pearcleaner Version: 5.4.3 (Build 121)
---
### Issue:
When the user's home directory resides on a non-boot volume (e.g. a secondary internal or external drive mounted at `/Volumes/`), enabling Homebrew auto-update scheduling fails with "Failed to register LaunchAgent: Bootstrap failed: 5: Input/output error".
**Root cause:** macOS launchd refuses to load plists from non-boot volumes for security reasons. Since Pearcleaner writes the plist to `~/Library/LaunchAgents/`, and that path resolves to `/Volumes/<DriveName>/Users/<username>/Library/LaunchAgents/`, launchd rejects it. The actual error from `log show`:
```
Caller specified a plist with bad ownership/permissions: path = /Volumes/<DriveName>/Users/<username>/Library/LaunchAgents/com.alienator88.Pearcleaner.homebrew-autoupdate.plist
```
**Suggested fix:** Detect that `$HOME` is on a non-boot volume and write the plist to `/Library/LaunchAgents/` (system-level) instead, with `root:wheel` / `644` permissions.
#### Steps:
1. Have home directory on a non-boot volume (e.g. `/Volumes/<n>/Users/<username>/`)
2. Enable Homebrew auto-update scheduling in Pearcleaner
3. Observe "Failed to register LaunchAgent: Bootstrap failed: 5: Input/output error"
#### Screenshots:
N/A
#### Debug Console
<pre> N/A </pre>
#### Console Logs
<pre> N/A </pre>
0 条评论