You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
4.7 KiB

Index: lib/build.js
--- lib/build.js.orig 2016-10-21 03:46:47.000000000 +0200
+++ lib/build.js 2016-10-22 00:05:22.166113142 +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/cache/add-local-tarball.js
--- lib/cache/add-local-tarball.js.orig 2016-10-21 03:46:47.000000000 +0200
+++ lib/cache/add-local-tarball.js 2016-10-22 00:05:22.166113142 +0200
@@ -157,13 +157,13 @@
// or the root dir, if none had to be created, so that
// we know that we get all the children.
function chown () {
- chownr(created || root, cs.uid, cs.gid, done)
+ done(null)
}
if (er) return cb(er)
var read = fs.createReadStream(tgz)
var write = writeStreamAtomic(target, { mode: npm.modes.file })
- var fin = cs.uid && cs.gid ? chown : done
+ var fin = cs.uid && cs.gid ? done : done
read.on('error', cb).pipe(write).on('error', cb).on('close', fin)
})
})
Index: lib/cache/add-local.js
--- lib/cache/add-local.js.orig 2016-10-21 03:46:47.000000000 +0200
+++ lib/cache/add-local.js 2016-10-22 00:05:22.166113142 +0200
@@ -123,12 +123,7 @@
return wrapped(er)
}
- if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) return wrapped()
-
- chownr(made || tgz, cs.uid, cs.gid, function (er) {
- if (er && er.code === 'ENOENT') return wrapped()
- wrapped(er)
- })
+ wrapped()
})
}
})
Index: lib/cache/add-remote-git.js
--- lib/cache/add-remote-git.js.orig 2016-10-21 03:46:47.000000000 +0200
+++ lib/cache/add-remote-git.js 2016-10-22 00:05:22.176171194 +0200
@@ -233,19 +233,7 @@
return cb(er)
}
- chownr(cachedRemote, cs.uid, cs.gid, function (er) {
- if (er) {
- log.error(
- 'setPermissions',
- 'Failed to change git repository ownership under npm cache for',
- cachedRemote
- )
- return cb(er)
- }
-
- log.verbose('setPermissions', from, 'set permissions on', cachedRemote)
resolveHead(from, cloneURL, treeish, cachedRemote, cb)
- })
})
}
}
@@ -406,9 +394,7 @@
// Ensure that both the template and remotes directories have the correct
// permissions.
- fs.chown(templates, stats.uid, stats.gid, function (er) {
- cb(er, stats)
- })
+ cb(undefined, stats)
})
})
}
Index: lib/cache/caching-client.js
--- lib/cache/caching-client.js.orig 2016-10-21 03:46:47.000000000 +0200
+++ lib/cache/caching-client.js 2016-10-22 00:05:22.176171194 +0200
@@ -183,7 +183,7 @@
writeFile(cachePath, JSON.stringify(data), function (er) {
if (er) return saved()
- chownr(made || cachePath, st.uid, st.gid, saved)
+ saved()
})
})
})
Index: lib/search/all-package-metadata.js
--- lib/search/all-package-metadata.js.orig 2016-10-21 03:46:47.000000000 +0200
+++ lib/search/all-package-metadata.js 2016-10-22 00:05:22.176171194 +0200
@@ -238,7 +238,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 2016-10-21 03:46:47.000000000 +0200
+++ lib/utils/correct-mkdir.js 2016-10-22 00:05:22.176171194 +0200
@@ -116,8 +116,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 2016-10-21 03:46:47.000000000 +0200
+++ lib/utils/lifecycle.js 2016-10-22 00:07:01.276236566 +0200
@@ -160,7 +160,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.')
}