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

Commit

Permalink
Fix #2172 Don't remove global mans uninstalling local pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Feb 18, 2012
1 parent 391e7d0 commit f322b0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/unbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ function rmBins (pkg, folder, parent, top, cb) {
}

function rmMans (pkg, folder, parent, top, cb) {
if (!pkg.man || !top || process.platform === "win32") return cb()
if (!pkg.man
|| !top
|| process.platform === "win32"
|| !npm.config.get("global")) {
return cb()
}
var manRoot = path.resolve(npm.config.get("prefix"), "share", "man")
asyncMap(pkg.man, function (man, cb) {
var parseMan = man.match(/(.*)\.([0-9]+)(\.gz)?$/)
Expand Down

0 comments on commit f322b0d

Please sign in to comment.