✏️ 正在编辑: find.js
路径:
/opt/alt/alt-nodejs22/root/usr/lib/node_modules/npm/node_modules.bundled/@npmcli/git/lib/find.js
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
const is = require('./is.js') const { dirname } = require('path') module.exports = async ({ cwd = process.cwd(), root } = {}) => { while (true) { if (await is({ cwd })) { return cwd } const next = dirname(cwd) if (cwd === root || cwd === next) { return null } cwd = next } }
💾 保存文件
← 返回文件管理器