node-regedit icon indicating copy to clipboard operation
node-regedit copied to clipboard

Specify max buffer of execFile

Open pd4d10 opened this issue 6 years ago • 2 comments

If the stdout exceeds the default max buffer size(1024 * 1024), it would throw an error:

UnhandledPromiseRejectionWarning: RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded

Reference: https://nodejs.org/api/child_process.html#child_process_maxbuffer_and_unicode

Seems it is necessary to add an option to specify it.

pd4d10 avatar Oct 17 '19 10:10 pd4d10

Is there any fix for this yet? Logging some of the paths will easily exceed the max buffer size.

NightFurySL2001 avatar Sep 25 '21 13:09 NightFurySL2001

Had to manually edit this for my use case, as the buffer is larger than the default setting. Would be great if this could be done, as it's not that complex, just another argument that needs to be passed into childProcess.execFile.

6ixfalls avatar Oct 07 '21 00:10 6ixfalls