mirror of
https://github.com/nodejs/node.git
synced 2025-05-16 12:34:33 +00:00

PR-URL: https://github.com/nodejs/node/pull/10781 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
14 lines
300 B
JavaScript
14 lines
300 B
JavaScript
var log = require('npmlog')
|
|
var which = require('which')
|
|
|
|
function getGitPath (cb) {
|
|
var tracker = log.newItem('getGitPath', 1)
|
|
tracker.info('getGitPath', 'Finding git in your PATH')
|
|
which('git', function (err, path) {
|
|
tracker.finish()
|
|
cb(err, path)
|
|
})
|
|
}
|
|
|
|
module.exports = getGitPath
|