operon-agents-core 0.1.0-alpha.0 → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -150,6 +150,12 @@ export class BaseMachine {
|
|
|
150
150
|
throw new Error(`${this.name}: a backend with no process SPI must override run().`);
|
|
151
151
|
}
|
|
152
152
|
const proc = await this.spawn(this.withCwdArgv(argv, options.cwd), options.env);
|
|
153
|
+
// A child that exits without draining stdin makes the write fail with EPIPE, and that
|
|
154
|
+
// failure arrives as an 'error' event rather than a throw — the try/catch below cannot see
|
|
155
|
+
// it. With no listener node treats it as an uncaught exception and takes the whole process
|
|
156
|
+
// down, which is how a hook script that ignores its stdin killed a CI run. The command's
|
|
157
|
+
// exit code and output are the real result, so a stdin that nobody read is not our error.
|
|
158
|
+
proc.stdin.on("error", () => { });
|
|
153
159
|
if (options.stdin !== undefined)
|
|
154
160
|
proc.stdin.write(options.stdin);
|
|
155
161
|
try {
|