kessler / node-regedit

Read, Write, List and do all sorts of funky stuff to the windows registry using node.js and windows script host
MIT License
279 stars 45 forks source link

Specify max buffer of execFile #72

Open pd4d10 opened 4 years ago

pd4d10 commented 4 years ago

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.

NightFurySL2001 commented 2 years ago

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

6ixfalls commented 2 years ago

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.