get-git-path.js 300 B

12345678910111213
  1. var log = require('npmlog')
  2. var which = require('which')
  3. function getGitPath (cb) {
  4. var tracker = log.newItem('getGitPath', 1)
  5. tracker.info('getGitPath', 'Finding git in your PATH')
  6. which('git', function (err, path) {
  7. tracker.finish()
  8. cb(err, path)
  9. })
  10. }
  11. module.exports = getGitPath