@@ -117,44 +117,15 @@ var linkStuff = build.linkStuff = function (pkg, folder, global, didRB, cb) {
117
117
if (gnm) log.silly('linkStuff', packageId(pkg), 'is installed into a global node_modules')
118
118
if (gtop) log.silly('linkStuff', packageId(pkg), 'is installed into the top-level global node_modules')
119
119
120
-
shouldWarn(pkg, folder, global, function () {
121
-
asyncMap(
122
-
[linkBins, linkMans, !didRB && rebuildBundles],
123
-
function (fn, cb) {
124
-
if (!fn) return cb()
125
-
log.verbose(fn.name, packageId(pkg))
126
-
fn(pkg, folder, parent, gtop, cb)
127
-
},
128
-
cb
129
-
)
130
-
})
131
-
}
132
-
133
-
function shouldWarn (pkg, folder, global, cb) {
134
-
var parent = path.dirname(folder)
135
-
var top = parent === npm.dir
136
-
var cwd = npm.localPrefix
137
-
138
-
readJson(path.resolve(cwd, 'package.json'), function (er, topPkg) {
139
-
if (er) return cb(er)
140
-
141
-
var linkedPkg = path.basename(cwd)
142
-
var currentPkg = path.basename(folder)
143
-
144
-
// current searched package is the linked package on first call
145
-
if (linkedPkg !== currentPkg) {
146
-
// don't generate a warning if it's listed in dependencies
147
-
if (Object.keys(topPkg.dependencies || {})
148
-
.concat(Object.keys(topPkg.devDependencies || {}))
149
-
.indexOf(currentPkg) === -1) {
150
-
if (top && pkg.preferGlobal && !global) {
151
-
log.warn('prefer global', packageId(pkg) + ' should be installed with -g')
152
-
}
153
-
}
154
-
}
155
-
156
-
cb()
157
-
})
120
+
asyncMap(
121
+
[linkBins, linkMans, !didRB && rebuildBundles],
122
+
function (fn, cb) {
123
+
if (!fn) return cb()
124
+
log.verbose(fn.name, packageId(pkg))
125
+
fn(pkg, folder, parent, gtop, cb)
126
+
},
127
+
cb
128
+
)
158
129
}
159
130
160
131
function rebuildBundles (pkg, folder, parent, gtop, cb) {
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4