diff --git a/lib/fetchers/git.js b/lib/fetchers/git.js index 5d16a57..c4ea3d3 100644 --- a/lib/fetchers/git.js +++ b/lib/fetchers/git.js @@ -157,7 +157,7 @@ function resolve (url, spec, name, opts) { function withTmp (opts, cb) { if (opts.cache) { // cacache has a special facility for working in a tmp dir - return cacache.tmp.withTmp(opts.cache, {tmpPrefix: 'git-clone'}, cb) + return cacache.tmp.withTmp(opts.cache, {tmpPrefix: 'git-clone', uid: opts.uid, gid: opts.gid}, cb) } else { const tmpDir = path.join(osenv.tmpdir(), 'pacote-git-tmp') const tmpName = uniqueFilename(tmpDir, 'git-clone')