mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
fix: handle Windows EOF error in large-input hook test
Windows pipes raise EOF instead of EPIPE when the child process exits before stdin finishes flushing. Added EOF to the ignored error codes in runHookWithInput.
This commit is contained in:
parent
733295b44e
commit
328cbbdbb9
1 changed files with 3 additions and 2 deletions
|
|
@ -58,9 +58,10 @@ function runHookWithInput(scriptPath, input = {}, env = {}, timeoutMs = 10000) {
|
|||
proc.stdout.on('data', data => stdout += data);
|
||||
proc.stderr.on('data', data => stderr += data);
|
||||
|
||||
// Ignore EPIPE errors (process may exit before we finish writing)
|
||||
// Ignore EPIPE/EOF errors (process may exit before we finish writing)
|
||||
// Windows uses EOF instead of EPIPE for closed pipe writes
|
||||
proc.stdin.on('error', (err) => {
|
||||
if (err.code !== 'EPIPE') {
|
||||
if (err.code !== 'EPIPE' && err.code !== 'EOF') {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue