diff --git a/lib/internal/fs/rimraf.js b/lib/internal/fs/rimraf.js index 6988425ecbaeb5..b8eade61cf9bea 100644 --- a/lib/internal/fs/rimraf.js +++ b/lib/internal/fs/rimraf.js @@ -249,7 +249,7 @@ function _rmdirSync(path, options, originalErr) { for (let i = 1; i <= tries; i++) { try { - return rmdirSync(path, { ...options, recursive: false }); + return rmdirSync(path); } 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.