Ignore stdout errors when running from console
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
634270bd80
commit
d6078a63ed
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