fix(agent-hooks): silence exit-127 spam from stale managed hook entries (#1536)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-05-07 13:05:30 -07:00
committed by GitHub
co-authored by Orca
parent ace5c56714
commit c375f403ef
6 changed files with 104 additions and 12 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import {
createManagedCommandMatcher,
readHooksJson,
removeManagedCommands,
wrapPosixHookCommand,
writeHooksJson,
writeManagedScript,
type HookDefinition
@@ -39,7 +40,7 @@ function getManagedScriptPath(): string {
}
function getManagedCommand(scriptPath: string): string {
return process.platform === 'win32' ? scriptPath : `/bin/sh "${scriptPath}"`
return process.platform === 'win32' ? scriptPath : wrapPosixHookCommand(scriptPath)
}
function getManagedScript(): string {