builder
Advanced tools
Comparing version 2.3.1 to 2.3.2
History | ||
======= | ||
## 2.3.2 | ||
* Fix `stdout maxBuffer exceeded` error by bumping `exec` buffer to 32mb. | ||
[#62](https://github.com/FormidableLabs/builder/issues/62) | ||
## 2.3.1 | ||
@@ -5,0 +10,0 @@ |
@@ -11,2 +11,16 @@ "use strict"; | ||
// One limitation of `exec()` is that it unconditionally buffers stdout/stderr | ||
// input (whether piped, listened, or whatever) leading to a `maxBuffer` bug: | ||
// https://github.com/FormidableLabs/builder/issues/62 | ||
// | ||
// We set a comfortable margin here to up the number. In the future, we could | ||
// just go "whole hog" and bump to `Infinity` if needed. | ||
// | ||
// Longer term, we can consider whether we want to do what npm does and use | ||
// `spawn` with manual OS-compatible `sh` vs. `cmd` detection, cobble together | ||
// our own flags and manage everything so that we can use the much more flexible | ||
// `spawn` instead of `exec`. | ||
// https://github.com/FormidableLabs/builder/issues/20 | ||
var MAX_BUFFER = 32 * 1024 * 1024; | ||
/** | ||
@@ -22,2 +36,7 @@ * Run a single task. | ||
var run = function (cmd, shOpts, opts, callback) { | ||
// Update shell options. | ||
shOpts = _.extend({ | ||
maxBuffer: MAX_BUFFER | ||
}, shOpts); | ||
// Check if buffered output or piped. | ||
@@ -24,0 +43,0 @@ var buffer = opts.buffer; |
{ | ||
"name": "builder", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "An NPM-based task runner", | ||
@@ -5,0 +5,0 @@ "repository": { |
50577
950