elektronikworkshop / cocopa

Compiler Command Parser - Parser to extract include directories, defines, arguments from compiler command line invocations
Other
0 stars 3 forks source link

make callback split by newline #6

Open clouds56 opened 3 years ago

clouds56 commented 3 years ago

This PR keeps backwards compatibility as when nothing passed in as eol, it keeps considering every input as a single line. While it could benefit some spawn function (at least on macOS) that would split input buffer when a line longer than 8192 characters. i.e. make the following code actually work without handle '\n' manually

const child = spawn(cmd, args)
child.stdout.on('data', runner.callback('\n'))