summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/lib/util/git.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/pacote/lib/util/git.js')
-rw-r--r--deps/npm/node_modules/pacote/lib/util/git.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/npm/node_modules/pacote/lib/util/git.js b/deps/npm/node_modules/pacote/lib/util/git.js
index fc3d158fa7..ed1b49d56a 100644
--- a/deps/npm/node_modules/pacote/lib/util/git.js
+++ b/deps/npm/node_modules/pacote/lib/util/git.js
@@ -109,8 +109,13 @@ function revs (repo, opts) {
env: gitEnv()
}, opts).then(child => {
let stdout = ''
+ let stderr = ''
child.stdout.on('data', d => { stdout += d })
- return finished(child).then(() => {
+ child.stderr.on('data', d => { stderr += d })
+ return finished(child).catch(err => {
+ err.message = `Error while executing:\n${GITPATH} ls-remote -h -t ${repo}\n\n${stderr}\n${err.message}`
+ throw err
+ }).then(() => {
return stdout.split('\n').reduce((revs, line) => {
const split = line.split(/\s+/, 2)
if (split.length < 2) { return revs }