{"bin":{},"dist":{"shasum":"1586b8387f92d15bdc74e179bd1791db30975137","tarball":"https://registry.npmjs.org/comandante/-/comandante-0.0.0.tgz","integrity":"sha512-Ah/OI5K9R5SCpli2noNJlBDltsPLMAgbfxJHd8Z7dEShhSMkOkivkS1qY+FHzJHb8v0KtCJctd28p0k8sV0U7Q==","signatures":[{"sig":"MEYCIQDF2rhARLKJYCXlQkyya8xPGhxM2REGLIUWVz3jj+tj9gIhANAvDrfWOAC+wOgOHnCXT5aPWSr4cNxu/LGTdXr4kLlY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","name":"comandante","author":{"url":"http://substack.net","name":"James Halliday","email":"mail@substack.net"},"readme":"# commandante\n\nSpawn commands returning a duplex stream. Emit stderr when the command exits\nwith a non-zero code.\n\n[![build status](https://secure.travis-ci.org/substack/comandante.png)](http://travis-ci.org/substack/comandante)\n\n## example\n\n``` js\nvar run = require('commandante');\nrun('git', [ 'log' ]).pipe(process.stdout);\n```\n\nin a git directory we get:\n\n```\n$ node example/log.js | head -n3\ncommit ae5045cce4980a87b7151cfe91bc5889951aae39\nAuthor: James Halliday <mail@substack.net>\nDate:   Tue Oct 2 09:08:18 2012 -0700\n```\n\nin a non-git directory we get:\n\n```\nevents.js:66\n        throw arguments[1]; // Unhandled 'error' event\n                       ^\nError: non-zero exit code 128: fatal: Not a git repository (or any of the parent directories): .git\n\n    at ChildProcess.<anonymous> (/home/substack/projects/comandante/index.js:19:27)\n    at ChildProcess.EventEmitter.emit (events.js:91:17)\n    at maybeClose (child_process.js:634:16)\n    at Socket.ChildProcess.spawn.stdin (child_process.js:805:11)\n    at Socket.EventEmitter.emit (events.js:88:17)\n    at Socket._destroy.destroyed (net.js:358:10)\n    at process.startup.processNextTick.process._tickCallback (node.js:244:9)\n```\n\n# methods\n\n``` js\nvar commandante = require('commandante')\n```\n\n## commandante(cmd, args, opts={})\n\nSpawn a new process like `require('child_process')`.spawn()`, except the return\nvalue is a duplex stream combining `stdout` and `stdin`.\n\nIf the process exits with a non-zero status, emit an `'error'` event with the\nstderr data and the code in an informative message.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install comandante\n```\n\n# license\n\nMIT\n","license":"MIT","scripts":{"test":"tap test/*.js"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"homepage":"https://github.com/substack/comandante","keywords":["spawn","stream","duplex","stderr","exit","code","non-zero"],"repository":{"url":"git://github.com/substack/comandante.git","type":"git"},"_npmVersion":"1.1.59","description":"spawn() that returns a duplex stream and emits errors with stderr data on non-zero exit codes","directories":{"test":"test","example":"example"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dependencies":{"duplexer":"~0.0.2"},"devDependencies":{"tap":"~0.3.0","through":"~1.1.0"},"_id":"comandante@0.0.0","version":"0.0.0"}