From ce315692770548fd6c07b89453046aedcbffc01c Mon Sep 17 00:00:00 2001 From: Christian Bager Bach Houmann Date: Fri, 10 Jul 2026 23:12:52 +0200 Subject: [PATCH] fix(orca): invoke the runner via the worktree-local bin in the archive hook Orca runs hooks with a non-login GUI PATH where the npm shim is often absent, so `npm exec obsidian-e2e` could fail and be swallowed by `|| true`, leaking the worktree's Obsidian instance. The local node_modules/.bin launcher is POSIX sh and needs only node, which the existing guard already checks. Mirrors quickadd ca29a8a7. --- orca.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/orca.yaml b/orca.yaml index de0a14b..0a91a89 100644 --- a/orca.yaml +++ b/orca.yaml @@ -22,7 +22,10 @@ # - The hook needs `node` on the GUI app's PATH (Orca runs it via non-login # /bin/bash). It is guarded with `command -v node` so a missing node degrades # to a no-op (the reap-on-next-start safety net then handles cleanup) instead -# of erroring. +# of erroring. The runner is invoked through the worktree-local bin rather +# than `npm exec` because the npm shim is often absent from that GUI PATH, +# which would make the stop fail silently behind `|| true` and leak the +# instance; the bin launcher is POSIX sh and needs only node. scripts: archive: | - command -v node >/dev/null 2>&1 && npm exec obsidian-e2e -- stop --worktree "$ORCA_WORKTREE_PATH" || true + command -v node >/dev/null 2>&1 && "$ORCA_WORKTREE_PATH/node_modules/.bin/obsidian-e2e" stop --worktree "$ORCA_WORKTREE_PATH" || true