Ignore stdout errors when running from console
This commit is contained in:
parent
757b237186
commit
e4aa4de5e1
1 changed files with 3 additions and 1 deletions
|
@ -9,7 +9,7 @@ import { CircularBuffer } from 'cirbuf';
|
||||||
import type { BrowserWindow } from 'electron';
|
import type { BrowserWindow } from 'electron';
|
||||||
import { app, ipcMain as ipc } from 'electron';
|
import { app, ipcMain as ipc } from 'electron';
|
||||||
import readFirstLine from 'firstline';
|
import readFirstLine from 'firstline';
|
||||||
import { filter, flatten, map, pick, sortBy } from 'lodash';
|
import { filter, flatten, map, noop, pick, sortBy } from 'lodash';
|
||||||
import {
|
import {
|
||||||
createReadStream,
|
createReadStream,
|
||||||
mkdirSync,
|
mkdirSync,
|
||||||
|
@ -100,6 +100,8 @@ export async function initialize(
|
||||||
streams.push({ stream: rotatingStream });
|
streams.push({ stream: rotatingStream });
|
||||||
|
|
||||||
if (isRunningFromConsole) {
|
if (isRunningFromConsole) {
|
||||||
|
process.stdout.on('error', noop);
|
||||||
|
|
||||||
streams.push({
|
streams.push({
|
||||||
level: 'debug' as const,
|
level: 'debug' as const,
|
||||||
stream: process.stdout,
|
stream: process.stdout,
|
||||||
|
|
Loading…
Reference in a new issue