{"_id":"sync-exec","_rev":"42171","name":"sync-exec","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","dist-tags":{"latest":"0.6.2"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"time":{"modified":"2021-06-03T10:12:46.000Z","created":"2014-03-24T21:38:35.397Z","0.6.2":"2015-08-24T16:52:25.770Z","0.6.1":"2015-07-21T16:36:20.022Z","0.6.0":"2015-07-20T18:40:42.747Z","0.5.0":"2015-03-03T02:49:11.390Z","0.4.0":"2014-11-03T20:14:32.637Z","0.3.2":"2014-04-09T18:14:11.686Z","0.3.1":"2014-03-25T06:05:31.433Z","0.3.0":"2014-03-24T21:38:35.397Z"},"users":{"beeman":true,"tjwebb":true,"penguinpowernz":true,"9joneg":true,"jamesmgreene":true,"cben":true,"kexi":true,"noncreature0714":true,"stone-jin":true,"cagcak":true},"author":{"name":"Greg Varsanyi"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"versions":{"0.6.2":{"name":"sync-exec","version":"0.6.2","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","main":"js/sync-exec.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"keywords":["exec","execSync","fs","sync","synchronous","status code","status"],"author":{"name":"Greg Varsanyi"},"license":"MIT","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"homepage":"https://github.com/gvarsanyi/sync-exec","devDependencies":{"coffee-script":"^1.9.3"},"gitHead":"ecbbeee5d1ff8d2df8b9f234d8098d1dbd64ba08","_id":"sync-exec@0.6.2","_shasum":"717d22cc53f0ce1def5594362f3a89a2ebb91105","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"},"dist":{"shasum":"717d22cc53f0ce1def5594362f3a89a2ebb91105","size":5028,"noattachment":false,"key":"/sync-exec/-/sync-exec-0.6.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sync-exec/download/sync-exec-0.6.2.tgz"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"directories":{},"publish_time":1440435145770,"_cnpm_publish_time":1440435145770,"_hasShrinkwrap":false},"0.6.1":{"name":"sync-exec","version":"0.6.1","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","main":"js/sync-exec.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"keywords":["exec","execSync","fs","sync","synchronous","status code","status"],"author":{"name":"Greg Varsanyi"},"license":"MIT","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"homepage":"https://github.com/gvarsanyi/sync-exec","devDependencies":{"coffee-script":"^1.9.3"},"gitHead":"637985e46964ba51f778ca072adc9d037d9e400c","_id":"sync-exec@0.6.1","_shasum":"220d8eb9bcac9efb6bbf4cc06ce20bed1a50f19d","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"},"dist":{"shasum":"220d8eb9bcac9efb6bbf4cc06ce20bed1a50f19d","size":11173,"noattachment":false,"key":"/sync-exec/-/sync-exec-0.6.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sync-exec/download/sync-exec-0.6.1.tgz"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"directories":{},"publish_time":1437496580022,"_cnpm_publish_time":1437496580022,"_hasShrinkwrap":false},"0.6.0":{"name":"sync-exec","version":"0.6.0","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","main":"js/sync-exec.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"keywords":["exec","execSync","fs","sync","synchronous","status code","status"],"author":{"name":"Greg Varsanyi"},"license":"MIT","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"homepage":"https://github.com/gvarsanyi/sync-exec","devDependencies":{"coffee-script":"^1.9.3"},"gitHead":"e7f340d6f36996c261aa4ce73d1468d6f6c78be1","_id":"sync-exec@0.6.0","_shasum":"c34f89dd534c2c6524925788ccb5186b47c8e3e8","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"},"dist":{"shasum":"c34f89dd534c2c6524925788ccb5186b47c8e3e8","size":11101,"noattachment":false,"key":"/sync-exec/-/sync-exec-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sync-exec/download/sync-exec-0.6.0.tgz"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"directories":{},"publish_time":1437417642747,"_cnpm_publish_time":1437417642747,"_hasShrinkwrap":false},"0.5.0":{"name":"sync-exec","version":"0.5.0","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","main":"js/sync-exec.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"keywords":["exec","execSync","fs","sync","synchronous","status code","status"],"author":{"name":"Greg Varsanyi"},"license":"GNU GPLv2","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"homepage":"https://github.com/gvarsanyi/sync-exec","devDependencies":{"coffee-script":"^1.9.1"},"gitHead":"43bfba8dc84aeaa1347f8d7bf52d5427dd65db82","_id":"sync-exec@0.5.0","_shasum":"3f7258e4a5ba17245381909fa6a6f6cf506e1661","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"dist":{"shasum":"3f7258e4a5ba17245381909fa6a6f6cf506e1661","size":10458,"noattachment":false,"key":"/sync-exec/-/sync-exec-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sync-exec/download/sync-exec-0.5.0.tgz"},"directories":{},"publish_time":1425350951390,"_cnpm_publish_time":1425350951390,"_hasShrinkwrap":false},"0.4.0":{"name":"sync-exec","version":"0.4.0","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","main":"js/sync-exec.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"keywords":["exec","execSync","fs","sync","synchronous","status code","status"],"author":{"name":"Greg Varsanyi"},"license":"GNU GPLv2","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"homepage":"https://github.com/gvarsanyi/sync-exec","devDependencies":{"coffee-script":"^1.8.0"},"gitHead":"19c517bf2dc977234ad865df66c1714af2ae354c","_id":"sync-exec@0.4.0","_shasum":"37582e7a04faf38cd6e53ea20445b99f992f6933","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"dist":{"shasum":"37582e7a04faf38cd6e53ea20445b99f992f6933","size":10004,"noattachment":false,"key":"/sync-exec/-/sync-exec-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sync-exec/download/sync-exec-0.4.0.tgz"},"directories":{},"publish_time":1415045672637,"_cnpm_publish_time":1415045672637,"_hasShrinkwrap":false},"0.3.2":{"name":"sync-exec","version":"0.3.2","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","main":"js/sync-exec.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"keywords":["exec","execSync","fs","sync","synchronous","status code","status"],"author":{"name":"Greg Varsanyi"},"license":"GNU GPLv2","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"homepage":"https://github.com/gvarsanyi/sync-exec","_id":"sync-exec@0.3.2","dist":{"shasum":"cc9885df142ca72b194552adeb29b014e7dee56a","size":8919,"noattachment":false,"key":"/sync-exec/-/sync-exec-0.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sync-exec/download/sync-exec-0.3.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"directories":{},"publish_time":1397067251686,"_cnpm_publish_time":1397067251686,"_hasShrinkwrap":false},"0.3.1":{"name":"sync-exec","version":"0.3.1","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","main":"js/sync-exec.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"keywords":["exec","execSync","fs","sync","synchronous","status code","status"],"author":{"name":"Greg Varsanyi"},"license":"GNU GPLv2","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"homepage":"https://github.com/gvarsanyi/sync-exec","_id":"sync-exec@0.3.1","dist":{"shasum":"49733214609169a88e75de0ae5e693f09ffcf1bc","size":8920,"noattachment":false,"key":"/sync-exec/-/sync-exec-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sync-exec/download/sync-exec-0.3.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"directories":{},"publish_time":1395727531433,"_cnpm_publish_time":1395727531433,"_hasShrinkwrap":false},"0.3.0":{"name":"sync-exec","version":"0.3.0","description":"Synchronous exec with status code support. Requires no external dependencies, no need for node-gyp compilations etc.","main":"js/sync-exec.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/gvarsanyi/sync-exec.git"},"keywords":["exec","execSync","fs","sync","synchronous","status code","status"],"author":{"name":"Greg Varsanyi"},"license":"GNU GPLv2","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"homepage":"https://github.com/gvarsanyi/sync-exec","_id":"sync-exec@0.3.0","dist":{"shasum":"f2bed3e0cc988ab37b2573355c0756dd4e91fb7b","size":8640,"noattachment":false,"key":"/sync-exec/-/sync-exec-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sync-exec/download/sync-exec-0.3.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"},"maintainers":[{"name":"gvarsanyi","email":"gvarsanyi@gmail.com"}],"directories":{},"publish_time":1395697115397,"_cnpm_publish_time":1395697115397,"_hasShrinkwrap":false}},"readme":"sync-exec\n=========\n\nAn fs.execSync replacement until you get it natively from node 0.12+\n\nUpgrading to 0.12.x is usually safe. At that point it will use child_process.execSync.\n\nYou can still force the emulated version passing `{forceEmulated: true}` to the `options` argument.\n\n\n# Advantages\nInspired by [exec-sync](https://www.npmjs.org/package/exec-sync) but comes with a few advantages:\n- no libc requirement (no node-gyp compilation)\n- no external dependencies\n- returns the exit status code\n- you can pass [execSync options](http://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options)\n- multiple commands should work pretty safely\n\n# Installation\n    [sudo] npm install sync-exec\n\n# Signature\n    exec(cmd[, timeout][, options]);\n\n# Examples\n    var exec = require('sync-exec');\n\n    // { stdout: '1\\n',\n    //   stderr: '',\n    //   status: 0 }\n    console.log(exec('echo 1'));\n\n    // You can even pass options, just like for [child_process.exec](http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)\n    console.log(exec('ls -la', {cwd: '/etc'}));\n\n    // Times out after 1 second, throws an error\n    exec('sleep 3; echo 1', 1000);\n\n# How it works (if you care)\nYour commands STDOUT and STDERR outputs will be channeled to files, also the exit code will be saved. Synchronous file readers will start listening to these files right after. Once outputting is done, values get picked up, tmp files get deleted and values are returned to your code.\n","_attachments":{},"homepage":"https://github.com/gvarsanyi/sync-exec","bugs":{"url":"https://github.com/gvarsanyi/sync-exec/issues"},"license":"MIT"}