Skip to content

Instantly share code, notes, and snippets.

@kaid
Created February 8, 2012 10:38
Show Gist options
  • Save kaid/1768036 to your computer and use it in GitHub Desktop.
Save kaid/1768036 to your computer and use it in GitHub Desktop.
capture stdout
var exec = require('child_process').exec;
var capture_stdout = function(cmd, callback) {
exec(cmd, function(err, stdout, stderr) {
callback(err, stdout, stderr);
});
}
module.exports = capture_stdout;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment