Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #38 from bugsnag/bengourley/tolerate-enotempty
Browse files Browse the repository at this point in the history
fix: Tolerate ENOTEMPTY when removing tmp directories
  • Loading branch information
bengourley committed May 14, 2019
2 parents f369337 + ae83862 commit 3582823
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function cleanupTempFiles (options) {
fs.unlinkSync(options.sourceMap)
}
fs.rmdir(options.tempDir, (err) => {
if (err) {
if (err && err.code !== 'ENOTEMPTY') {
reject(err)
} else {
resolve()
Expand Down

0 comments on commit 3582823

Please sign in to comment.