更新 lib/skill-admin.js

This commit is contained in:
QQ 2026-11-11 23:14:28 +08:00
parent 20deafc2d6
commit 2581f950d1
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ export class SkillAdmin {
if (!/^(https:\/\/|file:\/\/)/.test(url) || /[\s"'`]/.test(url) || url.length > 512) {
fail('invalid_url', '只接受 https:// 或 file:// 的 git 仓库地址。');
}
const scratch = join(dshHome(), `.cloud-memory-clone-${process.pid}-${Date.now().toString(36)}`);
const scratch = join(dshHome(), `.dsh-brain-clone-${process.pid}-${Date.now().toString(36)}`);
try {
await new Promise((resolvePromise, rejectPromise) => {
execFile('git', ['clone', '--depth', '1', '--no-tags', '--', url, scratch], { timeout: 120_000, env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }, maxBuffer: 4 * 1024 * 1024 }, (error) => (error ? rejectPromise(error) : resolvePromise()));