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

Commit

Permalink
fix link regression, regarding new path getters
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Oct 25, 2011
1 parent b7d33af commit d526a67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function linkStuff (pkg, folder, global, didRB, cb) {
// then bins are in {prefix}/bin
// otherwise, then bins are in folder/../.bin
var parent = path.dirname(folder)
, gnm = global && npm.dir
, gnm = global && npm.globalDir
, top = parent === npm.dir
, gtop = parent === gnm

Expand Down Expand Up @@ -131,7 +131,7 @@ function linkBins (pkg, folder, parent, gtop, cb) {
if (!pkg.bin || !gtop && path.basename(parent) !== "node_modules") {
return cb()
}
var binRoot = gtop ? npm.bin
var binRoot = gtop ? npm.globalBin
: path.resolve(parent, ".bin")
log.verbose([pkg.bin, binRoot, gtop], "bins linking")

Expand Down
4 changes: 2 additions & 2 deletions lib/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ function linkInstall (pkgs, cb) {
next()
}

var t = npm.globalDir
, pp = path.resolve(npm.dir, pkg)
var t = path.resolve(npm.globalDir, "..")
, pp = path.resolve(npm.globalDir, pkg)
, rp = null
, target = path.resolve(npm.dir, pkg)

Expand Down

0 comments on commit d526a67

Please sign in to comment.