Skip to content

Commit b51ad0f

Browse files
committed
fix: TRAC-896 - avoid archiveManager readEntry stall on Windows/Node 24 CI
extractZipFiles() called zipFile.readEntry() for the next entry immediately after the previous entry's pipeline() resolved. On windows-latest with Node 24.x this stalls once a second real read+inflate cycle is requested, timing out CI (build (24.x, windows-latest) failing on PR #1383). The three fastest-failing tests only skip to the next entry after a completed extraction cycle; tests that resolve/reject on the first entry are unaffected. Yield a tick (setImmediate) before calling readEntry() so the prior entry's zlib inflate stream and fd fully tear down before the next entry is requested. Fixes TRAC-896
1 parent 2b7d04e commit b51ad0f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/archiveManager.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ async function extractZipFiles({ zipPath, fileToExtract, exclude = [], outputNam
4444
resolve();
4545
return;
4646
}
47+
// Windows: yield a tick so the previous entry's read stream (zlib
48+
// inflate + fd) fully tears down before requesting the next one,
49+
// otherwise readEntry() can stall (observed on windows-latest/Node 24 CI).
50+
await new Promise((r) => {
51+
setImmediate(r);
52+
});
4753
zipFile.readEntry();
4854
} catch (err) {
4955
reject(err);

0 commit comments

Comments
 (0)