exec-sync

v0.1.6
Execute shell command synchronously. Use this for migration scripts, cli programs, but not for regular server code.
exec sync synchronously synchronous shell

exec-sync

Execute shell command synchronously. Use this for migration scripts, cli programs, but not for regular server code.

Installation

Installing npm (node package manager)

$ curl http://npmjs.org/install.sh | sh

Installing exec-sync

$ cd /path/to/your/project
$ [sudo] npm install exec-sync

Using exec-sync from node.js

Warning: use only for special operation or command line scripts written with node. Don't use this for regular server code or it will ruin the responsiveness of your server.

var execSync = require('exec-sync');

var user = execSync('echo $USER');
console.log(user);

TODO

Throw error when something went wrong.

npm i exec-sync

Metadata

  • Unknown
  • Whatever
  • Jeremy Faivre
  • released 6/12/2013

Downloads

Maintainers