fix(gh-monitor): use absolute paths for gh and openclaw (launchd has no PATH)

This commit is contained in:
2026-03-16 00:46:42 -04:00
parent 505fe09ed3
commit 9c34c0401b

View File

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