mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-06-18 21:45:04 +08:00
fix(cmd/main): -update-protocol 不保存新文件
This commit is contained in:
parent
bd785d3894
commit
fcf79ded58
@ -315,7 +315,11 @@ func LoginInteract() {
|
||||
log.Infof("如果登录时出现版本过低错误, 可尝试使用 -update-protocol 参数启动")
|
||||
case !isTokenLogin:
|
||||
_ = device.Protocol.Version().UpdateFromJson(remoteVersion)
|
||||
err := os.WriteFile(versionFile, remoteVersion, 0644)
|
||||
log.Infof("协议版本已更新: %s -> %s", currentVersionName, remoteVersionName)
|
||||
if err != nil {
|
||||
log.Warnln("更新协议版本缓存文件", versionFile, "失败:", err)
|
||||
}
|
||||
default:
|
||||
log.Infof("检测到协议更新: %s -> %s", currentVersionName, remoteVersionName)
|
||||
log.Infof("由于使用了会话缓存, 无法自动更新协议, 请删除缓存后重试")
|
||||
|
Loading…
x
Reference in New Issue
Block a user