We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44dd29f commit 2959d12Copy full SHA for 2959d12
index.js
@@ -29,9 +29,13 @@ R.prototype.call = function(_opts, _callback) {
29
var opts = _.isFunction(_opts) ? {} : _opts;
30
this.options.env.input = JSON.stringify([this.d, this.path, opts]);
31
var child = child_process.spawn("Rscript", this.args, this.options);
32
+ var body = "";
33
child.stderr.on("data", callback);
34
child.stdout.on("data", function(d) {
- callback(null, JSON.parse(d));
35
+ body += d;
36
+ });
37
+ child.on("close", function(code) {
38
+ callback(null, JSON.parse(body));
39
});
40
};
41
0 commit comments