Skip to content

Instantly share code, notes, and snippets.

@rockbot
Last active December 20, 2015 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rockbot/6075717 to your computer and use it in GitHub Desktop.
Save rockbot/6075717 to your computer and use it in GitHub Desktop.
doSomething = function(cb) {
exec(cmd, options, function(err, stdout, stderr) {
if (err) {
console.error(stdout);
console.error(stderr);
return cb(err);
}
// do some other stuff
return cb;
});
};
@julianduque
Copy link

doSomething = function(cb) {
  exec(cmd, options, { maxBuffer: 1000*1024 }, function(err, stdout, stderr) {
    if (err) {
      console.error(stdout);
      console.error(stderr);
      return cb(err);    
    } 

    // do some other stuff
    return cb;
  });
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment