Skip to content

Commit

Permalink
fs: rimraf should not recurse on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Oct 13, 2020
1 parent ce4ac15 commit ab8731c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/rimraf.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function _rmdirSync(path, options, originalErr) {

for (let i = 1; i <= tries; i++) {
try {
return rmdirSync(path, options);
return rmdirSync(path, {...options, recursive: false});
} catch (err) {
// Only sleep if this is not the last try, and the delay is greater
// than zero, and an error was encountered that warrants a retry.
Expand Down

0 comments on commit ab8731c

Please sign in to comment.