fix(updater): macOS in-place update can quit the app and leave a broken bundle
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start with buildMacAppReplaceScript in lib/core/updater/installers/update_install_utils.dart and MacosSparkleInstaller.install; trace how the script is launched and how failures are reported on the next start. Add tests for script quoting and failure paths, as the issue requests. Done means pre-flight checks, rollback and cleanup work, and failures are reported without leaving the app unavailable.
由索引模型根據 Issue 內容生成。
描述
Problem
buildMacAppReplaceScript (lib/core/updater/installers/update_install_utils.dart) and MacosSparkleInstaller.install can quit the app without installing anything, or corrupt the bundle.
mv "$TARGET" "$TARGET.old" || trueswallows failures. When the move fails (no write access to/Applications, read-only DMG volume, App Translocation after running from Downloads),cp -R "$NEW" "$TARGET"copies into the existing bundle: a nested.app, a broken seal, "damaged" from Gatekeeper.- With
set -e, a failingcpafter a successfulmvaborts the script and leaves no app at$TARGET. There is no rollback from.old. MacosSparkleInstallercallsexit(0)right after starting the script and never checks its result, so the user just sees the app close.$TARGET.oldis not removed on success; the extractedquerya-update-*temp directory is never cleaned.
Expected
Check before exiting that the target's parent is writable and the bundle is not translocated / on a read-only volume; if not, tell the user (and offer the download). Replace atomically with rollback from .old, remove .old on success, clean the temp dir, and report a script failure on next start.
Tasks
- Pre-flight writable / translocation / read-only check before
exit(0). - Remove
|| true, add rollback, remove.old. - Clean the extract dir.
- Unit tests for the script builder (quoting, failure paths).
- 主要語言
- Dart
- 星號
- 23
- 分支
- 1
- 平均合併
- 45 分鐘
- 30 天內合併 PR
- 529
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
QueryaHub/Querya-Desktop 的其他 Issue
-
bug P3 ux
難度 2/5 1-3 小時 新手友好度 79/100
QueryaHub/Querya-Desktop#1837 ·
維護者通常 1 天內回覆
-
bug mysql P3
難度 2/5 1-3 小時 新手友好度 76/100
QueryaHub/Querya-Desktop#1823 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1777 ·
維護者通常 1 天內回覆
-
enhancement ui
難度 2/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1689 ·
維護者通常 1 天內回覆
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflow未關閉bug frontend
難度 2/5 1-3 小時 新手友好度 82/100
QueryaHub/Querya-Desktop#1642 ·
維護者通常 1 天內回覆
查看 QueryaHub/Querya-Desktop 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
linagora/tmail-flutter#5034 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
fable-compiler/Fable#5157 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
bannzai/medicalarm#430 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 62/100
fossasia/badgemagic-app#2016 ·
維護者通常 1 天內回覆
-
area-vm
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 4 天內回覆