Repository navigation
Plugin update always fails with {"code":"already-installed"} — update path uses installBundle, which rejects any already-installed package #11250
mianbaome-commits
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
环境
~/.dsh/profiles/desktop现象
在插件市场点「更新」,任何已安装的插件都失败,错误完全一致:
日志文件
~/.dsh/profiles/desktop/.dsh-market/log.ndjson里,一次操作里多个插件全挂:每次都跟一条:
期望
更新到目标版本。
实际
pnpm 根本没跑;回滚后「构建恢复无法验证」,界面弹红字提示检查 profile 后重启。重启无效。
疑似根因
客户端包里的注释写着(原文,来自 app.asar 内文本):
也就是说
installBundle()在 pnpm 之前就按「包名是否已安装」拒绝,不比较版本。而「更新」这条路径调用的正是
installBundle()(日志里 spec 已带目标版本@pkg@x.y.z,但仍被拒)。推论:只要插件已经装在 profile 里,从市场点更新就永远不可能成功。
影响
插件市场的新版本提示完全无法执行,用户只能手动改
package.json+pnpm install绕过。建议
installBundle()的「已安装」判重,或在 spec 带明确版本时按版本比对;already-installed时至少保留可用的回滚状态——现在那句「restoration of the previous build could not be verified」让人以为插件损坏了(实际文件是好的)。附:文件层面核对过,
package.json与node_modules里的版本仍是旧版,插件本身可用,只是一直升不上去。All reactions