mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(spawnify) add checkArgs
This commit is contained in:
parent
b0a890cb93
commit
ef5e294259
1 changed files with 9 additions and 2 deletions
|
|
@ -17,9 +17,16 @@
|
|||
callback(error, stdout, stderr);
|
||||
};
|
||||
|
||||
сommand = args.shift();
|
||||
Util.checkArgs(arguments, ['command', 'callback']);
|
||||
|
||||
error = Util.exec.tryLog(function() {
|
||||
if (!callback) {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
|
||||
сommand = args.shift();
|
||||
|
||||
error = Util.exec.tryLog(function() {
|
||||
cmd = spawn(сommand, args, options);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue