Skip to content

Commit

Permalink
fix: Don't crash on failed delete after upload (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Aug 9, 2023
1 parent ee97da4 commit 789668d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/bundler-plugin-core/src/debug-id-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,13 @@ export function createDebugIdUploadFunction({
});
await Promise.all(
filePathsToDelete.map((filePathToDelete) =>
fs.promises.rm(filePathToDelete, { force: true })
fs.promises.rm(filePathToDelete, { force: true }).catch((e) => {
// This is allowed to fail - we just don't do anything
logger.debug(
`An error occured while attempting to delete asset: ${filePathToDelete}`,
e
);
})
)
);
deleteSpan.finish();
Expand Down

0 comments on commit 789668d

Please sign in to comment.