Skip to content

Commit

Permalink
fix(plugin-user-data-dir): Prevent ENOTEMPTY error (#405)
Browse files Browse the repository at this point in the history
Without the change, `fse.removeSync` only works with empty folder, so fails with ENOTEMPTY - jprichardson/node-fs-extra#178
  • Loading branch information
urlbox-io authored Jan 21, 2021
1 parent 0abcb1e commit 7b22a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/puppeteer-extra-plugin-user-data-dir/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Plugin extends PuppeteerExtraPlugin {
try {
// We're doing it sync to improve chances to cleanup
// correctly in the event of ultimate disaster.
fse.removeSync(this._userDataDir)
fse.rmdirSync(this._userDataDir, { recursive: true })
} catch (e) {
debug(e)
}
Expand Down

0 comments on commit 7b22a5c

Please sign in to comment.