Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Install T3 Code on Windows with WinGet (
winget install T3Tools.T3Code), per-user scope. - Keep T3 Code open, with agent turns running.
- When a newer version is published to WinGet, run:
In my case a scheduled job that upgrades WinGet packages ran this command, so I didn't start the update myself.
winget upgrade --id T3Tools.T3Code --exact --silent --accept-package-agreements --accept-source-agreements --disable-interactivity --scope user
Expected behavior
If the installer has to close a running T3 Code, it starts T3 Code again when it finishes, like an update from the in-app updater does. Better still, I'd get a chance to finish my work first, but a relaunch alone would make this much less disruptive.
Actual behavior
WinGet ran T3-Code-0.1.12-x64.exe /S. The installer closed the running app, installed 0.1.12 and exited. T3 Code stayed closed, the running agent turns stopped without warning, and I had to start the app myself.
The in-app updater was not involved. The desktop trace has no install or quit spans; it stops mid-session. The updater cache still held the 0.1.11 download from a week earlier.
Timeline from the WinGet log and desktop.trace.ndjson:
| Time | Event |
|---|---|
| 10:19:29 | winget upgrade --id T3Tools.T3Code ... --silent starts |
| 10:20:24 | WinGet starts the installer with /S |
| 10:20:42 | Last span in the old app's desktop trace |
| 10:20:58 | New T3 Code (Beta).exe written |
| 10:21:22 | WinGet reports success |
| 10:23:20 | I start T3 Code by hand |
Likely cause. electron-builder's NSIS installer starts the app after a silent install only when it gets --force-run. The in-app updater passes it (quitAndInstall({ isSilent: true, isForceRunAfter: true }) in apps/desktop/src/updates/DesktopUpdates.ts). The WinGet manifest for T3Tools.T3Code sets no InstallerSwitches, so WinGet passes only /S.
Possible fixes.
- In
apps/desktop/resources/installer.nsh, record whether T3 Code was running before the install (thecustomAppRunningMessagesmacro already looks for the running process) and start it again at the end of a silent install when it was, even without--force-run. This covers WinGet and any other tool that runs the installer silently. - Add
InstallerSwitches: { Silent: "/S --force-run", SilentWithProgress: "/S --force-run" }to the WinGet manifest. This is smaller, but it also starts T3 Code after a silent WinGet install or upgrade when it wasn't running.
Impact
Major degradation or frequent failure
Version or commit
0.1.11 (Beta) upgraded to 0.1.12 by WinGet
Environment
Windows 11 (build 26300), x64, per-user install in %LocalAppData%\Programs\t3code, WinGet 1.29.380
Logs or stack traces
WinGet log for the upgrade (trimmed):
10:19:29.250 [CORE] Command line Args: "...\winget.exe" upgrade --id T3Tools.T3Code --exact --silent --accept-package-agreements --accept-source-agreements --disable-interactivity --scope user
10:19:30.796 [CLI ] Manifest fields: Name [T3 Code], Version [0.1.12]
10:20:24.703 [CLI ] Successfully renamed downloaded installer. Path: ...\Temp\WinGet\T3Tools.T3Code.0.1.12\T3-Code-0.1.12-x64.exe
10:20:24.798 [CLI ] Installer args: /S
10:21:22.204 [CLI ] The entry determined to be associated with the package is 'T3 Code (Beta) 0.1.12', with publisher 'T3 Tools'
10:21:22.286 [CLI ] Leaf command succeeded: root:upgrade
Workaround
winget pin add --id T3Tools.T3Code --blocking keeps WinGet from upgrading T3 Code, so updates come only from the in-app updater, which asks before it restarts.
Activity