Sha256: 0ffeea200d18c25646b409cce1c06b13316b9e2a0013003df04a688cb4c9be8d
Contents?: true
Size: 339 Bytes
Versions: 36
Compression:
Stored size: 339 Bytes
Contents
const which = require('which') let gitPath try { gitPath = which.sync('git') } catch { // ignore errors } module.exports = (opts = {}) => { if (opts.git) { return opts.git } if (!gitPath || opts.git === false) { return Object.assign(new Error('No git binary found in $PATH'), { code: 'ENOGIT' }) } return gitPath }
Version data entries
36 entries across 36 versions & 2 rubygems