Repository navigation
Replies: 1 comment
最小复现:5 行即可复现$res = 'D:\DeepSeek_harness\resources' ExitCode=0,但 resources\runtime\office-skills 变成 0 个文件 |
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
issue-report.md
Summary / 摘要
On Windows, a silent update (
--updated /S --force-run) exits with code 0 but leavesresources\runtime\office-skillsempty. The next launch dies withDesktopHostFatalError: ENOENT ... office-skills\office\SKILL.mdand the app never starts.Root cause: the installer clears the legacy
resources\appdirectory following a directory junction inside it, deleting the freshly unpackedresources\runtimecontents.中文摘要:静默更新返回 0,但
resources\runtime\office-skills被清空,下次启动直接ENOENT崩掉、应用打不开。根因是安装器清理resources\app时穿透了里面的 junction, 把刚解包的 runtime 一起删了。Environment
Experiment 5 used a 2-file fake directory (a
package.jsonand one junction). Nothing from the plugin was running. That isolates the junction as the trigger.Probe files placed inside
resources\runtime,office-skillsandapp.asar.unpackeddisappeared in every run where the installer executed, confirming the installer clears these directories before unpacking.Why the failure is invisible / 为什么难发现
/Ssuppresses all UI; a failed or partial unpack produces no prompt at all.0, soelectron-updaterreports success.resources\appdirectory is already gone — so it looks like “update is broken, reinstall fixes it”.Official update journal / 官方更新日志
With
DSH_DESKTOP_UPDATE_JOURNAL_DIRset, a failing run records:and a successful run after removing the junction:
Suggested fixes / 建议修复
Installer (primary). When clearing the legacy
resources\appdirectory, do not recurse into reparse points. CheckFILE_ATTRIBUTE_REPARSE_POINT(GetFileAttributesW/FindFirstFiledwFileAttributes) and delete the link itself withRemoveDirectoryinstead of following it. NSISRMDir /rfollows junctions by default — this is the classic pitfall. A safer order is: unpack first, then remove the legacy directory, or remove the legacy directory before unpacking and never touchresources\runtimefrom that cleanup path.Host (defence in depth).
@deepseek-ai/dsh-skill-office/lib/index.jsreads everySKILL.mdwith a barereadFileSyncinsideSKILL_NAMES.map:A single missing file throws and becomes
DesktopHostFatalError, taking the whole app down. Two cheap mitigations:SKILL.mdis missing instead of throwing;app.asar(dsh/node_modules/@deepseek-ai/dsh-skill-office/assets/…) whenassetRootdoes not contain the expected files. The identical 8 files ship in both places today, so the fallback is free.Impact / 影响面
Any third-party plugin that unpacks
app.asarintoresources\app(a common technique for patching the client) leaves a junction there, and then every subsequent silent update bricks the app until the user manually reinstalls. Because the installer reports success, this is effectively silent data loss inside the installation directory.Workaround for users / 用户侧规避
Before updating, quit the app and remove
resources\app(delete the junction itself first, never recurse into it). After doing that, both--updated /S --force-runand the in-app updater complete normally.All reactions