/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/npm/node_modules/@npmcli/git/lib/which.js
18 строк
339 B
npm CLI robot
deps: upgrade npm to 8.18.0
18 авг 2022, 07:52
Не верифицирован
18 авг 2022, 07:52
cb8f0cb
Код
Авторство
О чём код?
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 }