mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
refactor(console) spawn, exec: get -> set
This commit is contained in:
parent
cd5609c45a
commit
2e3e5c1ab7
1 changed files with 4 additions and 4 deletions
|
|
@ -149,7 +149,7 @@
|
|||
}
|
||||
|
||||
if (!ClientFuncs[connNum])
|
||||
ClientFuncs[connNum] = Util.bind(getExec, function(json, error, stderr) {
|
||||
ClientFuncs[connNum] = Util.bind(setExec, function(json, error, stderr) {
|
||||
log(connNum, error, 'error');
|
||||
log(connNum, stderr, 'stderror');
|
||||
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
} else if (WIN32 || firstChar === ' ' || isContain)
|
||||
exec(command, options, lExec_func);
|
||||
else
|
||||
getSpawn(command, options, callback);
|
||||
setSpawn(command, options, callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +182,7 @@
|
|||
* function send result of command to client
|
||||
* @param callback
|
||||
*/
|
||||
function getExec(callback, error, stdout, stderr) {
|
||||
function setExec(callback, error, stdout, stderr) {
|
||||
var json,
|
||||
errorStr = stderr || error;
|
||||
|
||||
|
|
@ -197,7 +197,7 @@
|
|||
Util.exec(callback, json, error, stderr);
|
||||
}
|
||||
|
||||
function getSpawn(сommand, options, callback) {
|
||||
function setSpawn(сommand, options, callback) {
|
||||
var cmd, error,
|
||||
args = сommand.split(' '),
|
||||
send = function(error, data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue