Skip to content
This repository was archived by the owner on Oct 29, 2026. It is now read-only.

fix: Don't crash on failed delete after upload - #373

Merged
lforst merged 1 commit into
mainfrom
lforst-dont-crash-on-failed-delete
Aug 9, 2023
Merged

lforst merged 1 commit into
mainfrom
lforst-dont-crash-on-failed-delete

Conversation

@lforst

@lforst lforst commented Aug 9, 2023

Copy link
Copy Markdown

Fixes #370

@lforst
lforst requested review from kamilogorek and mydea August 9, 2023 07:30
});
await Promise.all(
filePathsToDelete.map((filePathToDelete) =>
fs.promises.rm(filePathToDelete, { force: true })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just use Promise.allSettled() everywhere. Then catch is redundant.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that would also work but the logging would get unnecessarily complex with having to check the status and stuff.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webpack plugin filesToDeleteAfterUpload: ENOENT: no such file or directory

2 participants