Skip to content

Commit

Permalink
cherry-pick(microsoft#28239): fix: collect all errors in removeFolders (
Browse files Browse the repository at this point in the history
microsoft#28243)

This PR cherry-picks the following commits:

- 440f5e5

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
playwrightmachine and github-actions[bot] authored Nov 20, 2023
1 parent b894916 commit e27bc9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/playwright-core/src/utils/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export async function mkdirIfNeeded(filePath: string) {

export async function removeFolders(dirs: string[]): Promise<Error[]> {
return await Promise.all(dirs.map((dir: string) =>
fs.promises.rm(dir, { recursive: true, force: true, maxRetries: 10 })
)).catch(e => e);
fs.promises.rm(dir, { recursive: true, force: true, maxRetries: 10 }).catch(e => e)
));
}

export function canAccessFile(file: string) {
Expand Down

0 comments on commit e27bc9f

Please sign in to comment.