set encoding when reading from streams
using .toString() works most of the time but can lead to utf8 characters being broken across chunk boundaries. https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding
This commit is contained in:
@@ -334,7 +334,7 @@ module.exports = CompileManager = {
|
||||
proc.on('error', callback)
|
||||
|
||||
let stderr = ''
|
||||
proc.stderr.on('data', chunk => (stderr += chunk.toString()))
|
||||
proc.stderr.setEncoding('utf8').on('data', chunk => (stderr += chunk))
|
||||
|
||||
return proc.on('close', function(code) {
|
||||
if (code === 0) {
|
||||
|
||||
Reference in New Issue
Block a user