Skip to content

Commit

Permalink
fix: lazy close for puppeteer
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyutaotao committed Jan 7, 2025
1 parent fb222b1 commit e76ff15
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/cli/src/cli-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export async function matchYamlFiles(fileGlob: string) {
const files = await glob(fileGlob, {
nodir: true,
windowsPathsNoEscape: true,
ignore: ['**/node_modules/**'],
});
return files
.filter((file) => file.endsWith('.yml') || file.endsWith('.yaml'))
Expand Down
8 changes: 7 additions & 1 deletion packages/web-integration/src/puppeteer/agent-launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ export async function puppeteerAgentForTarget(
name: 'puppeteer_browser',
fn: () => {
if (!preference?.keepWindow) {
browser.close();
if (isWindows) {
setTimeout(() => {
browser.close();
}, 800);
} else {
browser.close();
}
}
},
});
Expand Down

0 comments on commit e76ff15

Please sign in to comment.