From 5876005f73fca56fc5f14dfc6fb6f672cc2f76f5 Mon Sep 17 00:00:00 2001 From: garrytan Date: Thu, 29 Oct 2026 16:27:40 +0000 Subject: [PATCH] fix: base-red shell runner launches bash through runBashSync Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- lib/base-red.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/base-red.ts b/lib/base-red.ts index 71f486fc7..f1edb5dfc 100644 --- a/lib/base-red.ts +++ b/lib/base-red.ts @@ -12,12 +12,12 @@ * ends with a conditional receipt; `wait` re-runs the cases on each new base * head and returns once they pass there, and `/ship --resume` re-runs Step 5. */ -import { spawnSync } from 'node:child_process'; import * as fs from 'node:fs'; import * as path from 'node:path'; import type { ShipReceipt } from './headless-artifacts'; import { type BaseRedPolicy } from './ship-policy'; import { git, sha256, writeJsonAtomic } from './ship-queue-gate'; +import { runBashSync } from './script-invocation'; import { resolveStateRoot } from './state-root'; export const PAUSE_HOURS = 24; @@ -36,7 +36,7 @@ export interface PauseRecord { } export const shellRunner: Runner = (cwd, command, timeoutSec) => { - const r = spawnSync('bash', ['-c', command], { cwd, encoding: 'utf8', timeout: timeoutSec * 1000, env: { ...process.env, CI: process.env.CI ?? '1' }, maxBuffer: 64 * 1024 * 1024 }); + const r = runBashSync(command, { cwd, encoding: 'utf8', timeout: timeoutSec * 1000, env: { ...process.env, CI: process.env.CI ?? '1' }, maxBuffer: 64 * 1024 * 1024 }); return { status: r.status, out: `${r.stdout ?? ''}\n${r.stderr ?? ''}`, error: r.error ? r.error.message : r.signal ? `killed by ${r.signal}` : undefined }; };