mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
25 lines
1.4 KiB
Diff
25 lines
1.4 KiB
Diff
--- lib/update.js.orig 1985-10-26 08:15:00.000000000 +0000
|
|
+++ lib/update.js 2018-04-24 15:59:30.000000000 +0000
|
|
@@ -58,10 +58,17 @@
|
|
if (url.parse(ww.req).protocol) ww.what = ww.req
|
|
|
|
const where = (ww.dep.parent && ww.dep.parent.path) || ww.dep.path
|
|
- const isTransitive = !(ww.dep.requiredBy || []).some((p) => p.isTop)
|
|
- const key = where + ':' + String(isTransitive)
|
|
- if (!toInstall[key]) toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []}
|
|
- if (toInstall[key].what.indexOf(ww.what) === -1) toInstall[key].what.push(ww.what)
|
|
+ if (ww.what.match(/^npm@/) && where.match(/@@NPM_PATH_JSREGEX@@/)) {
|
|
+ log.error("Trying to update '" + ww.what + "' in '" + where + "'")
|
|
+ log.error("which is part of the MacPorts npm base installation.")
|
|
+ log.error("To update npm please run:")
|
|
+ log.error("sudo port selfupdate && sudo port upgrade npm5\n")
|
|
+ } else {
|
|
+ const isTransitive = !(ww.dep.requiredBy || []).some((p) => p.isTop)
|
|
+ const key = where + ':' + String(isTransitive)
|
|
+ if (!toInstall[key]) toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []}
|
|
+ if (toInstall[key].what.indexOf(ww.what) === -1) toInstall[key].what.push(ww.what)
|
|
+ }
|
|
})
|
|
return Bluebird.each(Object.keys(toInstall), (key) => {
|
|
const deps = toInstall[key]
|