fix(gh-monitor): set PATH + HOME in plist so launchd can find gh and openclaw

This commit is contained in:
2026-03-16 00:59:08 -04:00
parent 9c34c0401b
commit 68d00058f0
2 changed files with 10 additions and 3 deletions

View File

@@ -16,6 +16,13 @@
<string>/Users/hansheinemann/Projects/hans-tools/tools/gh-monitor/state/stdout.log</string>
<key>StandardErrorPath</key>
<string>/Users/hansheinemann/Projects/hans-tools/tools/gh-monitor/state/stderr.log</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/Users/hansheinemann/.nvm/versions/node/v22.22.1/bin</string>
<key>HOME</key>
<string>/Users/hansheinemann</string>
</dict>
<key>RunAtLoad</key>
<false/>
</dict>

View File

@@ -62,7 +62,7 @@ def save_state(state: dict, path: Path) -> None:
def gh_api(endpoint: str) -> list | dict:
result = subprocess.run(
["/usr/local/bin/gh", "api", "--paginate", endpoint],
["gh", "api", "--paginate", endpoint],
capture_output=True,
text=True,
)
@@ -135,7 +135,7 @@ def new_events_since(events: list[dict], cursor_ts: str, seen_ids: set) -> list[
def notify(text: str) -> None:
result = subprocess.run(
["/Users/hansheinemann/.nvm/versions/node/v22.22.1/bin/openclaw", "system", "event", "--text", text, "--mode", "now"],
["openclaw", "system", "event", "--text", text, "--mode", "now"],
capture_output=True,
text=True,
)
@@ -190,7 +190,7 @@ def dispatch_agent(repo_slug: str, pr: dict, event: dict) -> None:
try:
result = subprocess.run(
[
"/Users/hansheinemann/.nvm/versions/node/v22.22.1/bin/openclaw", "cron", "add",
"openclaw", "cron", "add",
"--name", job_name,
"--at", "1m",
"--session", "isolated",