We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef0d6d commit e20a528Copy full SHA for e20a528
scripts/bin-test/test.ts
@@ -210,8 +210,11 @@ async function runFileDiscovery(modulePath: string): Promise<DiscoveryResult> {
210
stderr += chunk.toString("utf8");
211
});
212
213
- const timeoutId = setTimeout(() => {
214
- proc.kill(9);
+ const timeoutId = setTimeout(async () => {
+ if (proc.pid) {
215
+ proc.kill(9);
216
+ await new Promise<void>((resolve) => proc.on("exit", resolve));
217
+ }
218
resolve({ success: false, error: `File discovery timed out after ${TIMEOUT_M}ms` });
219
}, TIMEOUT_M);
220
0 commit comments