diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-05-24 11:36:40 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-05-26 04:55:28 +0300 |
commit | af92d17a7f2119dbf0f356ea4424fa45c2d4a7b4 (patch) | |
tree | 57b1401adfe59d43ee5152f0e60c1677986cd4f3 /lib | |
parent | 6258cbefd4e4a9bf21548e5556f45afa825ad426 (diff) |
fix(perms): pacote.extract does not run scripts. we already have perm-dropping for cache stuff
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config/pacote.js | 5 | ||||
-rw-r--r-- | lib/install/action/extract.js | 6 |
2 files changed, 1 insertions, 10 deletions
diff --git a/lib/config/pacote.js b/lib/config/pacote.js index 13b7b53f5..530e33512 100644 --- a/lib/config/pacote.js +++ b/lib/config/pacote.js @@ -44,10 +44,7 @@ function pacoteOpts (moreOpts) { } if (ownerStats.uid || ownerStats.gid) { - Object.assign(opts, ownerStats, { - cacheUid: ownerStats.uid, - cacheGid: ownerStats.gid - }) + Object.assign(opts, ownerStats) } npm.config.keys.forEach(function (k) { diff --git a/lib/install/action/extract.js b/lib/install/action/extract.js index 783917785..c05a25dcd 100644 --- a/lib/install/action/extract.js +++ b/lib/install/action/extract.js @@ -10,7 +10,6 @@ const moduleName = require('../../utils/module-name.js') const moduleStagingPath = require('../module-staging-path.js') const move = BB.promisify(require('../../utils/move.js')) const npa = require('npm-package-arg') -const npm = require('../../npm.js') const packageId = require('../../utils/package-id.js') const pacote = require('pacote') const pacoteOpts = require('../../config/pacote') @@ -19,13 +18,8 @@ const path = require('path') module.exports = extract function extract (staging, pkg, log) { log.silly('extract', packageId(pkg)) - const up = npm.config.get('unsafe-perm') - const user = up ? null : npm.config.get('user') - const group = up ? null : npm.config.get('group') const extractTo = moduleStagingPath(staging, pkg) const opts = pacoteOpts({ - uid: user, - gid: group, integrity: pkg.package._integrity }) return pacote.extract( |