CB-5714 Fix of android build when too big output stops build with error due to buffer overflow.

This commit is contained in:
Vyacheslav Shabelnik 2013-12-23 17:20:54 +02:00 committed by Andrew Grieve
parent 7951eee8a3
commit 8e260d5c40
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ var child_process = require('child_process'),
module.exports = function(cmd, opt_cwd) {
var d = Q.defer();
try {
child_process.exec(cmd, {cwd: opt_cwd}, function(err, stdout, stderr) {
child_process.exec(cmd, {cwd: opt_cwd, maxBuffer: 1024000}, function(err, stdout, stderr) {
if (err) d.reject('Error executing "' + cmd + '": ' + stderr);
else d.resolve(stdout);
});

View File

@ -29,7 +29,7 @@ module.exports = function(cmd, opt_cwd) {
var d = Q.defer();
console.log('exec: ' + cmd);
try {
child_process.exec(cmd, {cwd: opt_cwd}, function(err, stdout, stderr) {
child_process.exec(cmd, {cwd: opt_cwd, maxBuffer: 1024000}, function(err, stdout, stderr) {
console.log([cmd, err, stdout, stderr]);
if (err) d.reject('Error executing "' + cmd + '": ' + stderr);
else d.resolve(stdout);