Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
clean up, use function declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisirhc committed Jan 18, 2016
1 parent 3e77b30 commit 6de468f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/unbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ function rmBins (pkg, folder, parent, top, cb) {
} else {
gentlyRm(path.resolve(binRoot, b), true, folder, cb)
}
}, function (err) {
if (err) return cb(err)
if (!top) return gentlyRm(binRoot, true, parent, cb)
return cb()
})
}, gentlyRmBinRoot)

function gentlyRmBinRoot (err) {
if (err || top) return cb(err)
return gentlyRm(binRoot, true, parent, cb)
}
}

function rmMans (pkg, folder, parent, top, cb) {
Expand Down

0 comments on commit 6de468f

Please sign in to comment.