From 4ae177e455dea219309e260f840ed93aedf5f705 Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 27 Mar 2017 10:15:07 +0800 Subject: [PATCH] add stderr msg to response --- route/api/modbus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/api/modbus.js b/route/api/modbus.js index 92834ae..aab8360 100644 --- a/route/api/modbus.js +++ b/route/api/modbus.js @@ -597,7 +597,7 @@ router record: [] }; exec(cmd, (err, stdout, stderr) => { - let msg = err ? err.toString() : stdout; + let msg = err ? err.toString() : `${stdout}${stderr}`; res.api_res.record.push({msg}); n();