Hacked By AnonymousFox

Current Path : /opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/node_modules.bundled/@npmcli/git/lib/
Upload File :
Current File : //opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/node_modules.bundled/@npmcli/git/lib/which.js

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
}

Hacked By AnonymousFox1.0, Coded By AnonymousFox