🐛 Fix patch install failure

This commit is contained in:
C-3PO 2018-09-16 03:04:08 +02:00
parent 6500b7a8c7
commit 496a9500a7
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -31,11 +31,14 @@ export default function launchProcess(
const spawnedProcess = childProcess.spawn(processPath, parameters.map((value) => value.toString(), { cwd: '.' }));
if (typeof output === 'string') {
//TODO: output stdout to console just in case for error logging
spawnedProcess.stdout.setEncoding('utf8');
spawnedProcess.stdout.on('data', (chunk) => {
console.log(chunk);
});
} else {
spawnedProcess.stdout.pipe(output);
spawnedProcess.stdout.on('end', resolve);
}
spawnedProcess.stdout.on('end', resolve);
spawnedProcess.stderr.setEncoding('utf8');
spawnedProcess.stderr.on('data', (error) => {