fix: 修复下载配置文件失败时的错误处理逻辑

This commit is contained in:
2025-12-17 12:18:55 +08:00
parent 0ca5989a40
commit 2393cbefbb
3 changed files with 263 additions and 9 deletions

View File

@@ -168,8 +168,11 @@ const clone = new Command('clone')
const res = await query.fetchText(link);
if (res.code === 200) {
fs.writeFileSync(sync.configPath, JSON.stringify(res.data, null, 2));
} else {
logger.error('下载配置文件失败', link, res);
return;
}
sync.init()
await sync.init()
}
const syncList = await sync.getSyncList();
logger.debug(syncList);