fix(writer): Silence IPC output on stdout (#1961)

This was causing the stdout maxBuffer size to be exceeded
when flashing larger images (or having flashes that took a while).

Fixes #1955 

Change-Type: patch
Changlog Entry: Fix "stdout maxBuffer exceeded" error on Linux
This commit is contained in:
Jonas Hermsmeier 2018-01-08 23:09:55 +01:00 committed by GitHub
parent ece9a5666e
commit 96dddecd4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -23,7 +23,10 @@ const writer = require('../../cli/writer')
ipc.config.id = process.env.IPC_CLIENT_ID
ipc.config.socketRoot = process.env.IPC_SOCKET_ROOT
ipc.config.silent = false
// NOTE: Ensure this isn't disabled, as it will cause
// the stdout maxBuffer size to be exceeded when flashing
ipc.config.silent = true
// > If set to 0, the client will NOT try to reconnect.
// See https://github.com/RIAEvangelist/node-ipc/

View File

@ -84,6 +84,9 @@ exports.performWrite = (image, drive, onProgress) => {
ipc.config.id = IPC_SERVER_ID
ipc.config.socketRoot = path.join(process.env.XDG_RUNTIME_DIR || os.tmpdir(), path.sep)
// NOTE: Ensure this isn't disabled, as it will cause
// the stdout maxBuffer size to be exceeded when flashing
ipc.config.silent = true
ipc.serve()