Skip to content

Commit

Permalink
fix: ignore ENOENT on recursive rmdir
Browse files Browse the repository at this point in the history
in Node 16, this throws an error if `folderName` DNE

nodejs/node#37216
  • Loading branch information
flotwig authored and MP committed Oct 15, 2023
1 parent 3e918cc commit 5e00128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/testing-dom__download/cypress/plugins/index.js
Expand Up @@ -116,7 +116,7 @@ module.exports = (on, config) => {

return new Promise((resolve, reject) => {
rmdir(folderName, { maxRetries: 10, recursive: true }, (err) => {
if (err) {
if (err && err.code !== 'ENOENT') {
console.error(err)

return reject(err)
Expand Down

0 comments on commit 5e00128

Please sign in to comment.