refactor(console) onCD

This commit is contained in:
coderaiser 2014-05-20 07:14:41 -04:00
parent 9a902fc1cf
commit 248bee3339

View file

@ -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)
});
});