pacote
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.3.1"></a> | ||
## [2.3.1](https://github.com/zkat/pacote/compare/v2.3.0...v2.3.1) (2017-04-26) | ||
### Bug Fixes | ||
* **git:** another attempt at fixing EPERM b.s. ([e445bef](https://github.com/zkat/pacote/commit/e445bef)) | ||
<a name="2.3.0"></a> | ||
@@ -7,0 +17,0 @@ # [2.3.0](https://github.com/zkat/pacote/compare/v2.2.2...v2.3.0) (2017-04-26) |
@@ -176,18 +176,6 @@ 'use strict' | ||
module.exports._exec = execGit | ||
function execGit (gitArgs, _gitOpts, opts) { | ||
function execGit (gitArgs, gitOpts, opts) { | ||
opts = optCheck(opts) | ||
const gitOpts = { | ||
env: gitEnv() | ||
} | ||
if (!isNaN(opts.uid)) { | ||
gitOpts.uid = +opts.uid | ||
} | ||
if (!isNaN(opts.gid)) { | ||
gitOpts.gid = +opts.gid | ||
} | ||
Object.keys(_gitOpts || {}).forEach(k => { | ||
gitOpts[k] = _gitOpts[k] | ||
}) | ||
return checkGit().then(gitPath => { | ||
return execFileAsync(gitPath, gitArgs, gitOpts) | ||
return execFileAsync(gitPath, gitArgs, mkOpts(gitOpts, opts)) | ||
}) | ||
@@ -197,19 +185,21 @@ } | ||
module.exports._spawn = spawnGit | ||
function spawnGit (gitArgs, _gitOpts, opts) { | ||
function spawnGit (gitArgs, gitOpts, opts) { | ||
opts = optCheck(opts) | ||
return checkGit().then(gitPath => { | ||
return cp.spawn(gitPath, gitArgs, mkOpts(gitOpts, opts)) | ||
}) | ||
} | ||
function mkOpts (_gitOpts, opts) { | ||
const gitOpts = { | ||
env: gitEnv() | ||
} | ||
if (!isNaN(opts.uid)) { | ||
if (+opts.uid && !isNaN(opts.uid)) { | ||
gitOpts.uid = +opts.uid | ||
} | ||
if (!isNaN(opts.gid)) { | ||
if (+opts.gid && !isNaN(opts.gid)) { | ||
gitOpts.gid = +opts.gid | ||
} | ||
Object.keys(_gitOpts).forEach(k => { | ||
gitOpts[k] = _gitOpts[k] | ||
}) | ||
return checkGit().then(gitPath => { | ||
return cp.spawn(gitPath, gitArgs, gitOpts) | ||
}) | ||
Object.assign(gitOpts, _gitOpts) | ||
return gitOpts | ||
} | ||
@@ -216,0 +206,0 @@ |
{ | ||
"name": "pacote", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "JavaScript package downloader", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
68633
1471