From 44da66456b530c049ff50953f78368460df87461 Mon Sep 17 00:00:00 2001 From: thriqon Date: Wed, 25 Feb 2015 20:42:09 +0100 Subject: git: log full git command line on error --- lib/utils/git.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/utils/git.js b/lib/utils/git.js index 78cb083ee..a312770a8 100644 --- a/lib/utils/git.js +++ b/lib/utils/git.js @@ -18,8 +18,13 @@ function prefixGitArgs () { } function execGit (args, options, cb) { - log.info("git", args) - return exec(git, prefixGitArgs().concat(args || []), options, cb) + log.info('git', args) + var fullArgs = prefixGitArgs().concat(args || []) + return exec(git, fullArgs, options, function (err) { + if (err) log.error('git', fullArgs.join(' ')) + + cb.apply(null, arguments) + }) } function spawnGit (args, options) { -- cgit v1.2.3