Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
wip(#6712 PR 4a): hardenedGitStream stdout typing
garrytan049d41841f79
diff --git a/src/core/hardened-git.ts b/src/core/hardened-git.tsindex 2231f7b5a1..e0ba16a9db 100644--- a/src/core/hardened-git.ts+++ b/src/core/hardened-git.ts@@ -112,7 +112,7 @@ export async function hardenedGitStream(root: string, args: string[],const settle = (outcome: () => void): void => { if (settled) return; settled = true; clearTimeout(timer); outcome(); };const fail = (error: unknown): void => { failure ??= { error }; child.kill('SIGKILL'); };const timer = setTimeout(() => { stopped ??= 'timeout'; child.kill('SIGKILL'); }, opts.timeoutMs);- child.stdout.on('data', (chunk: Buffer) => {+ child.stdout?.on('data', (chunk: Buffer) => {if (stopped || failure) return;bytes += chunk.length;if (opts.maxBytes !== undefined && bytes > opts.maxBytes) { stopped = 'too_large'; child.kill('SIGKILL'); return; }