✏️ 正在编辑: which.js
路径:
/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 }
💾 保存文件
← 返回文件管理器