mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(console) onCD
This commit is contained in:
parent
9a902fc1cf
commit
248bee3339
1 changed files with 5 additions and 7 deletions
|
|
@ -280,16 +280,14 @@
|
|||
dir = path.join(currDir, paramDir);
|
||||
|
||||
exec('cd ' + dir + ' && ' + getDir, function (error, stdout, stderr) {
|
||||
var lMsg = '',
|
||||
lError = error || stderr;
|
||||
var errorStr = '',
|
||||
errorData = error || stderr;
|
||||
|
||||
if (lError) {
|
||||
lError = Util.stringifyJSON(lError);
|
||||
lMsg = lError;
|
||||
}
|
||||
if (errorData)
|
||||
errorStr = Util.stringifyJSON(errorData);
|
||||
|
||||
Util.exec(callback, {
|
||||
stderr : lMsg,
|
||||
stderr : errorStr,
|
||||
stdout : CloudFunc.rmNewLine(stdout)
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue