exec-spawn
v1.0.1
Published
wrapper of spawn that can be used as exec.
Downloads
34
Readme
exec-spawn
wrapper of spawn that can be used as exec.
Install
npm install exec-spawn
Usage
var exec = require('exec-spawn');
exec('echo', ['test'], function(err, stdout, stderr) {
console.dir(stdout.toString()); // 'test\n'
});
var exec = require('exec-spawn');
var cmd = 'git';
var argument = ['log', '-n 1', '--oneline'];
var options = {
cwd: '../exec-spawn',
env: process.env
};
exec(cmd, argument, options, function(err, stdout, stderr) {
console.dir(stdout.toString()); // '9b1de95 Initial commit\n'
});