0.1.6 • Published 11 years ago

exec-sync v0.1.6

Weekly downloads
81
License
-
Repository
github
Last release
11 years ago

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.