fix: pipe via console.log with --enable-logging

This commit is contained in:
zlm committed 2026-06-10 15:17:05 +08:00
1 parent 3f40697795
commit d95db24c8e
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -33,8 +33,8 @@ function startBackend() {
env: { ...process.env, PORT: process.env.PORT || '3000' },
windowsHide: true,
})
backend.stdout.pipe(process.stdout)
backend.stderr.pipe(process.stderr)
backend.stdout.on('data', (d) => console.log(d.toString().trimEnd()))
backend.stderr.on('data', (d) => console.error(d.toString().trimEnd()))
isRunning = true
updateMenu()
backend.on('exit', () => { backend = null; isRunning = false; updateMenu() })