fix: stream node host scripts over stdin

This commit is contained in:
Codex
2026-07-01 11:57:56 +00:00
parent 58ed8c91e2
commit 60ae8129ec
2 changed files with 51 additions and 1 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ export function transPath(): string {
}
export function runNodeHostScript(spec: HwlabRuntimeLaneSpec, script: string, timeoutSeconds: number, input = ""): CommandResult {
return runCommand([transPath(), spec.nodeRoute, "sh", "--", script], repoRoot, { input, timeoutMs: timeoutSeconds * 1000 });
return runCommand([transPath(), spec.nodeRoute, "sh"], repoRoot, { input: `${script}\n${input}`, timeoutMs: timeoutSeconds * 1000 });
}
export function runNodeHostScriptAsync(spec: HwlabRuntimeLaneSpec, script: string, timeoutSeconds: number, label: string): CommandResult {