add stderr msg to response

This commit is contained in:
Jay 2017-03-27 10:15:07 +08:00
parent c990935194
commit 4ae177e455

View File

@ -597,7 +597,7 @@ router
record: [] record: []
}; };
exec(cmd, (err, stdout, stderr) => { exec(cmd, (err, stdout, stderr) => {
let msg = err ? err.toString() : stdout; let msg = err ? err.toString() : `${stdout}${stderr}`;
res.api_res.record.push({msg}); res.api_res.record.push({msg});
n(); n();