mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 10:20:22 +08:00
fix: 解包失败时放回升级前的目录。
升级脚本先挪走旧目录后,解开中途失败会把那一份放回去。补丁没写完不清除升级标记,下次启动再试。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3ca5b1ec63
commit
b47ebfb976
3 files changed
+26
-13
No files matched your search
+1
-1
@@ -320,11 +320,11 @@ function shimNeedsPatch(state) {
|
||||
async function settleInstalledPatches(config, ctx) {
|
||||
if (officialUpdate.upgradeMarkerExists(process.execPath)) {
|
||||
const upgraded = await reapply.reapplyInstalled({ scheduleSwap: false, forceExtract: true });
|
||||
officialUpdate.clearUpgradeMarker(process.execPath);
|
||||
if (!upgraded.ok) {
|
||||
log(config, "official upgrade reapply failed:", upgraded.error || "");
|
||||
return "reapply-failed";
|
||||
}
|
||||
officialUpdate.clearUpgradeMarker(process.execPath);
|
||||
officialUpdate.clearStaleExtractedApps(process.execPath);
|
||||
log(config, "official upgrade reapplied; restarting onto the new build");
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user