mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-06 20:02:49 +08:00
fix: 汉化版检测兜底——版本号含 -zh 时强制判定为汉化版
Rust get_version_info + Web dev-api.js get_version_info: 如果检测到的版本号包含 "-zh" 后缀,直接覆盖 source 为 "chinese", 不再依赖文件系统路径检测(Windows .cmd shim 路径不含包名信息)
This commit is contained in:
@@ -2983,8 +2983,10 @@ const handlers = {
|
||||
|
||||
// 版本信息
|
||||
async get_version_info() {
|
||||
const source = detectInstalledSource()
|
||||
let source = detectInstalledSource()
|
||||
const current = getLocalOpenclawVersion()
|
||||
// 兜底:版本号含 -zh 则一定是汉化版
|
||||
if (current && current.includes('-zh') && source !== 'chinese') source = 'chinese'
|
||||
const latest = await getLatestVersionFor(source)
|
||||
const recommended = recommendedVersionFor(source)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user