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 committed Nov 10, 2021
1 parent 897f0a8 commit da8b648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/testing-dom__download/cypress/plugins/index.js
Original file line number Diff line number Diff line change
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 da8b648

Please sign in to comment.