Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/desktop/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
// non-zero exit we dump the captured stderr ring as a crash file.

serverExitPromise = new Promise((resolve) => {
serverProcess!.on('exit', (code) => {

Check warning on line 616 in apps/desktop/src/main.ts

View workflow job for this annotation

GitHub Actions / Lint / Format / Typecheck / Test / Build

Forbidden non-null assertion
if (code !== 0) {
console.error(`[desktop] server exited with code ${code}`);
dumpServerCrash(code ?? -1);
Expand Down Expand Up @@ -1086,7 +1086,15 @@
}
});

if (IS_DEV) {
// Auto-open DevTools only for real UI development (Vite HMR via
// dev:desktop) or when explicitly requested with HUABU_DEVTOOLS=1.
// Other unpacked runs (e.g. `start:desktop`, or an unpacked production
// build run straight from source) behave like production. F12 /
// Ctrl+Shift+I still toggle them at any time (see above).
if (
IS_DEV &&
(process.env.WEB_DEV_SERVER_URL || process.env.HUABU_DEVTOOLS === '1')
) {
mainWindow.webContents.openDevTools();
}

Expand Down
Loading