Skip to content

Commit e76ff15

Browse files
committed
fix: lazy close for puppeteer
1 parent fb222b1 commit e76ff15

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/cli/src/cli-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export async function matchYamlFiles(fileGlob: string) {
5353
const files = await glob(fileGlob, {
5454
nodir: true,
5555
windowsPathsNoEscape: true,
56+
ignore: ['**/node_modules/**'],
5657
});
5758
return files
5859
.filter((file) => file.endsWith('.yml') || file.endsWith('.yaml'))

packages/web-integration/src/puppeteer/agent-launcher.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,13 @@ export async function puppeteerAgentForTarget(
8686
name: 'puppeteer_browser',
8787
fn: () => {
8888
if (!preference?.keepWindow) {
89-
browser.close();
89+
if (isWindows) {
90+
setTimeout(() => {
91+
browser.close();
92+
}, 800);
93+
} else {
94+
browser.close();
95+
}
9096
}
9197
},
9298
});

0 commit comments

Comments
 (0)