Skip to content

Instantly share code, notes, and snippets.

@ralphtheninja
Created July 25, 2014 18:00
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 ralphtheninja/3ff4de8b5f8044f027d1 to your computer and use it in GitHub Desktop.
Save ralphtheninja/3ff4de8b5f8044f027d1 to your computer and use it in GitHub Desktop.
var execFn = function(cmd, opts) {
opts = opts || {}
return function(cb) {
console.log(cmd)
exec(cmd, opts, function(error, stdout, stderr) {
if (error) {
console.error(error);
} else {
console.log('ok')
}
cb(opts.ignoreError ? null : error)
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment