Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit 44da664

Browse files
thriqonothiym23
authored andcommitted
git: log full git command line on error
1 parent 687117a commit 44da664

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

lib/utils/git.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ function prefixGitArgs () {
1818
}
1919

2020
function execGit (args, options, cb) {
21-
log.info("git", args)
22-
return exec(git, prefixGitArgs().concat(args || []), options, cb)
21+
log.info('git', args)
22+
var fullArgs = prefixGitArgs().concat(args || [])
23+
return exec(git, fullArgs, options, function (err) {
24+
if (err) log.error('git', fullArgs.join(' '))
25+
26+
cb.apply(null, arguments)
27+
})
2328
}
2429

2530
function spawnGit (args, options) {

0 commit comments

Comments
 (0)