promised-exec
Promised version of NodeJS child_process exec.
How to install this module?
To install this module use following command at root path of your module:
npm install promised-exec --save
Usage
This module exports function which waits only one argument on input: string with terminal command.
Function returns promise (based on library "q").
If command is invalid, the catch
function will be called with object which contains string with error, and default error buffer (argument error of exec callback).
If command is valid, but response of command is error, the catch
function will be called with object which contains string with error, and default error buffer (argument error of exec callback).
If command is valid, and response is correct, the the
function will be called with string which contains response of command.
Example (correct command):
var exec promise;exec = ;promise = ;promise;
Example (incorrect command):
var exec promise;exec = ;promise = ;promise;
Example (incorrect command arguments):
var exec promise;exec = ;promise = ;promise;