mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 00:50:59 +00:00
refactor(console) getOnMessage
This commit is contained in:
parent
a2604fdc91
commit
ebc7159c37
1 changed files with 7 additions and 6 deletions
|
|
@ -108,11 +108,14 @@
|
|||
* @param callback
|
||||
*/
|
||||
function getOnMessage(connNum, callback, command) {
|
||||
var winCommand, symbolsExec, funcExec, firstChar,
|
||||
var winCommand, funcExec, firstChar,
|
||||
connName, ret, isContain,
|
||||
dir, options = {};
|
||||
|
||||
dir = ClientDirs[connNum];
|
||||
|
||||
symbolsExec = ['*', '&', '{', '}', '|', '\'', '"'],
|
||||
dir = ClientDirs[connNum],
|
||||
options = {
|
||||
cwd: dir || DIR
|
||||
};
|
||||
|
||||
if (!dir)
|
||||
dir = ClientDirs[connNum] = DIR;
|
||||
|
|
@ -157,10 +160,8 @@
|
|||
});
|
||||
|
||||
funcExec = ClientFuncs[connNum];
|
||||
symbolsExec = ['*', '&', '{', '}', '|', '\'', '"'];
|
||||
isContain = Util.isContainStr(command, symbolsExec);
|
||||
firstChar = command[0];
|
||||
options.cwd = dir;
|
||||
|
||||
if (firstChar === '#') {
|
||||
command = command.slice(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue