From 1c9b5dfd00dd072c3bbb1ffc44b1c727fa924c77 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 10 Apr 2016 12:21:07 +0100 Subject: [PATCH] add status to exec spawn mode --- nodes/core/core/75-exec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nodes/core/core/75-exec.js b/nodes/core/core/75-exec.js index f7807d452..c9b2eb442 100644 --- a/nodes/core/core/75-exec.js +++ b/nodes/core/core/75-exec.js @@ -64,7 +64,9 @@ module.exports = function(RED) { //console.log('[exec] result: ' + code); delete node.activeProcesses[ex.pid]; msg.payload = code; - node.status({}); + if (code === 0) { node.status({}); } + else if (code < 0) { node.status({fill:"red",shape:"dot",text:"rc: "+code}); } + else { node.status({fill:"yellow",shape:"dot",text:"rc: "+code}); } node.send([null,null,msg]); }); ex.on('error', function (code) {