mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 09:30:22 +08:00
fix(patch): #84 host code=0 clean exit no-fail — stopped 对话框消除
#83 只覆盖了 signal kill (code===null),但 host 正常 exit(0) 仍走 else this.fail 'stopped' 弹对话框。#84 作为 upgrade patch:删掉 else-fail-stopped 行,只有真正 非 0 exit 才 fail。fresh 装走 #83 → #84 两步,已经应用 #83 的只跑 #84。 - #83 desc 措辞 '静默' → '不报错' 对齐 YG 描述 - client.js 加 patch.84 zh/en 翻译 markers: 'close no-fail v2' (与 #83 的 'signal kill' 独立)
This commit is contained in:
1 parent
36870324f2
commit
c17e668a3a
2 files changed
+30
-3
No files matched your search
+26
-1
@@ -4525,7 +4525,7 @@ const NEW_TOOL_PATCHES = [
|
||||
name: "DESKTOP_HOST_CLOSE_NO_FATAL",
|
||||
layer: "代码",
|
||||
layer_en: "Code",
|
||||
desc: "host 被信号杀 (重启密封包) 时静默退出,不弹 crash dialog / silence host-stopped crash on signal kill",
|
||||
desc: "host 被信号杀 (重启密封包) 时不报错,不弹 crash dialog / don't fail on signal kill",
|
||||
file: "desktop-shell",
|
||||
surfaces: ["desktop"],
|
||||
replacements: [
|
||||
@@ -4554,6 +4554,31 @@ const NEW_TOOL_PATCHES = [
|
||||
],
|
||||
markers: ["[dsh-purge] signal kill"],
|
||||
},
|
||||
{
|
||||
id: 84,
|
||||
name: "DESKTOP_HOST_CLOSE_CODE0_NO_FAIL",
|
||||
layer: "代码",
|
||||
layer_en: "Code",
|
||||
desc: "host code=0 正常退出不报错 (消除 stopped 对话框) / don't fail on code=0 clean exit",
|
||||
file: "desktop-shell",
|
||||
surfaces: ["desktop"],
|
||||
optional: true,
|
||||
replacements: [
|
||||
{
|
||||
pattern:
|
||||
"\t\t\t\tif (code === null || signal) { resolve(); return; }\n" +
|
||||
"\t\t\t\tif (code !== 0) this.fail(/* @__PURE__ */ new Error(`dsh desktop host exited with ${String(code)}${suffix}`));\n" +
|
||||
"\t\t\t\telse this.fail(/* @__PURE__ */ new Error(`dsh desktop host stopped${suffix}`));\n" +
|
||||
"\t\t\t\tresolve();",
|
||||
replace:
|
||||
"\t\t\t\tif (code === null || signal) { resolve(); return; }\n" +
|
||||
"\t\t\t\t// [dsh-purge] close no-fail v2: code=0 正常退出不报错,只有真正非 0 exit 才弹对话框\n" +
|
||||
"\t\t\t\tif (code !== 0) this.fail(/* @__PURE__ */ new Error(`dsh desktop host exited with ${String(code)}${suffix}`));\n" +
|
||||
"\t\t\t\tresolve();",
|
||||
},
|
||||
],
|
||||
markers: ["[dsh-purge] close no-fail v2"],
|
||||
},
|
||||
{
|
||||
id: 67,
|
||||
name: "AGENT_LOOP_MESSAGES_GUARD",
|
||||
|
||||
Reference in new issue
Block a user