Skip to content

Commit

Permalink
Another way to detect fs.rm
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jun 13, 2021
1 parent 89b6e1c commit f8a4526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/size-limit/rm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let { existsSync } = require('fs')
let fs = require('fs').promises

module.exports = async function rm(dir) {
if (process.version.startsWith('v12.')) {
if (!fs.rm) {
/* istanbul ignore next */
if (existsSync(dir)) {
await fs.rmdir(dir, { recursive: true })
Expand Down

0 comments on commit f8a4526

Please sign in to comment.