fix: R2归档解压路径修正(qingchencloud→@qingchencloud) + Docker构建脚本

This commit is contained in:
晴天
2026-03-16 15:06:05 +08:00
parent a4f9c28c3b
commit 41c4d6f9fe
3 changed files with 176 additions and 0 deletions

View File

@@ -206,6 +206,13 @@ async function _tryR2Install(version, source, logs) {
logs.push(`解压到 ${modulesDir}`)
execSync(`tar -xzf "${tmpPath}" -C "${modulesDir}"`, { timeout: 60000, windowsHide: true })
// 归档内目录可能是 qingchencloud/Windows tar 不支持 @ 前缀),需要重命名
const noAtDir = path.join(modulesDir, 'qingchencloud')
if (fs.existsSync(noAtDir) && !fs.existsSync(qcDir)) {
fs.renameSync(noAtDir, qcDir)
logs.push('目录已修正: qingchencloud → @qingchencloud')
}
// 创建 bin 链接
let binDir
if (isWindows) {