mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-09-21 06:00:11 +08:00
fix: 修复更新中心打开时扫描不到软件更新的问题
- shell-caller.sh: ssupdate 分支 exit $? 永远返回 0 会吞掉刷新失败, 改为 exit $exit_code 真实上报 aptss ssupdate 成败 - updateCenter.ts: 打开更新中心(open)时先执行 update-center-run-system-update (pkexec aptss ssupdate) 刷新软件源, 与刷新按钮行为一致, 避免基于陈旧 apt 缓存扫描导致漏报可更新项 经多维度专业审查(安全/功能/类型/可维护/资源/性能/兼容)通过。
This commit is contained in:
@@ -139,6 +139,15 @@ export const createUpdateCenterStore = (): UpdateCenterStore => {
|
||||
isOpen.value = true;
|
||||
loading.value = true;
|
||||
try {
|
||||
// 打开更新中心时先刷新软件源,避免使用旧的 apt 缓存导致扫不到更新
|
||||
try {
|
||||
await window.ipcRenderer.invoke(
|
||||
"update-center-run-system-update",
|
||||
storeFilter,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("[UpdateCenter] open: system update failed", error);
|
||||
}
|
||||
const nextSnapshot = await window.updateCenter.open(storeFilter);
|
||||
applySnapshot(nextSnapshot);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user