Index: lib/build.js
--- lib/build.js.orig 2017-05-26 05:24:16.000000000 +0200
+++ lib/build.js 2017-05-26 08:42:11.662542000 +0200
@@ -230,7 +230,7 @@
function linkMans (pkg, folder, parent, gtop, cb) {
if (!pkg.man || !gtop || process.platform === 'win32') return cb()
- var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man')
+ var manRoot = path.resolve(npm.config.get('prefix'), 'man')
log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot)
// make sure that the mans are unique.
Index: lib/config/core.js
--- lib/config/core.js.orig 2017-05-26 05:24:16.000000000 +0200
+++ lib/config/core.js 2017-05-26 08:42:55.433045000 +0200
@@ -298,7 +298,7 @@
fs.writeFile(target.path, data, 'utf8', function (er) {
if (er) return then(er)
if (where === 'user' && myUid && myGid) {
- fs.chown(target.path, +myUid, +myGid, then)
+ then()
} else {
then()
}
Index: lib/npm.js
--- lib/npm.js.orig 2017-05-26 05:24:16.000000000 +0200
+++ lib/npm.js 2017-05-26 08:42:11.662790000 +0200
@@ -400,9 +400,7 @@
Object.defineProperty(npm, 'globalDir',
{
get: function () {
- return (process.platform !== 'win32')
- ? path.resolve(npm.globalPrefix, 'lib', 'node_modules')
- : path.resolve(npm.globalPrefix, 'node_modules')
+ return path.resolve(npm.globalPrefix, 'lib', 'node', 'usr')
},
enumerable: true
})
Index: lib/search/all-package-metadata.js
--- lib/search/all-package-metadata.js.orig 2017-05-26 05:24:16.000000000 +0200
+++ lib/search/all-package-metadata.js 2017-05-26 08:43:14.455041000 +0200
@@ -3,7 +3,6 @@
var fs = require('graceful-fs')
var path = require('path')
var mkdir = require('mkdirp')
-var chownr = require('chownr')
var npm = require('../npm.js')
var log = require('npmlog')
var cacheFile = require('npm-cache-filename')
@@ -240,7 +239,7 @@
if (er) return cb(er)
mkdir(cacheBase, function (er, made) {
if (er) return cb(er)
- chownr(made || cacheBase, st.uid, st.gid, cb)
+ cb(null)
})
})
}
Index: lib/utils/correct-mkdir.js
--- lib/utils/correct-mkdir.js.orig 2017-05-26 05:24:16.000000000 +0200
+++ lib/utils/correct-mkdir.js 2017-05-26 08:43:25.782771000 +0200
@@ -1,4 +1,3 @@
-var chownr = require('chownr')
var dezalgo = require('dezalgo')
var fs = require('graceful-fs')
var inflight = require('inflight')
@@ -116,8 +115,5 @@
}
function setPermissions (path, st, cb) {
- chownr(path, st.uid, st.gid, function (er) {
- if (er && er.code === 'ENOENT') return cb(null, st)
- return cb(er, st)
- })
+ cb(null, st)
}
Index: lib/utils/lifecycle.js
--- lib/utils/lifecycle.js.orig 2017-05-26 05:24:16.000000000 +0200
+++ lib/utils/lifecycle.js 2017-05-26 08:42:11.663441000 +0200
@@ -166,7 +166,6 @@
if (cfgsetting === 'warn-only') {
if (isDifferentNodeInPath && !shouldPrependCurrentNodeDirToPATH.hasWarned) {
if (foundExecPath) {
- log.warn('lifecycle', 'The node binary used for scripts is', foundExecPath, 'but npm is using', process.execPath, 'itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.')
} else {
log.warn('lifecycle', 'npm is using', process.execPath, 'but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.')
}