mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(console) getExec
This commit is contained in:
parent
d3fc54b24d
commit
3d4b1f3fc2
1 changed files with 4 additions and 9 deletions
|
|
@ -184,17 +184,12 @@
|
|||
*/
|
||||
function getExec(callback, error, stdout, stderr) {
|
||||
var json,
|
||||
errorStr = stderr || error,
|
||||
isStr = Util.isString(errorStr);
|
||||
errorStr = stderr || error;
|
||||
|
||||
if (errorStr) {
|
||||
if (!isStr)
|
||||
errorStr = errorStr.toString();
|
||||
|
||||
errorStr = CloudFunc.addNewLine(errorStr);
|
||||
}
|
||||
if (errorStr)
|
||||
errorStr = CloudFunc.addNewLine(errorStr + '');
|
||||
|
||||
json = {
|
||||
json = {
|
||||
stdout : stdout,
|
||||
stderr : errorStr
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue