{"bin":{},"dist":{"shasum":"8051da6082e87208aadd52bd817275b7c8035009","tarball":"https://registry.npmjs.org/comandante/-/comandante-0.0.1.tgz","integrity":"sha512-v+oHWculB8bDLaNKNnU296dvnpTdk38oQdryVD4KtwLB9i7RdYasi3t296PYxijereTBOMZHw2m/B54LCtlFxw==","signatures":[{"sig":"MEQCIEOTRfvJCEhk1wRxZXrTllR8yIbpMR22UC0Ma+WQnz8VAiBSgfR2ctf0zS+Pn7PWD6kuMsUZ1DW4VmfNThSh5QHa6w==","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\nIf `opts.showCommand` is not `false`, show the actual command in the informative\nerror message. If you are running a command with passwords in the command\narguments make sure to set `showCommand` to `false`.\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.1","version":"0.0.1"}